Wrong position of a Label of a collapsed subgraph


I have a question regarding SubGraphs and their labels.

When I collapse a subgraph that has a simple node in it (not a subgraph), the label of the outer subgraph is displayed correctly, but if the subgraph has another subgraph in it, then when I collapse the outer subgraph, the label is displayed not where it should be.

(I work with version on Windows Vista 32bit).

I attached some screenshots of the problem.

Is there a way to make the label show correctly when the the subgraph is collapsed?

Thanks in advance!

Do you override LayoutLabel in your SubGraph class?

I tried to override it, but it didn’t help. Maybe I just don’t set the position of the label correctly. Could you explain to me how can I correct the position of the label inside LayoutLabel? I would be very thankful.

What are your settings for CollapsedLabelSpot and Collapsed Margins?

I tried both calling lab.SetSpotLocation(TopCenter, h, TopCenter), and lab.SetSpotLocation(TopLeft, h, TopRight), where lab is the label, and setting this.CollapsedLabelSpot = TopCenter; where this is the subgraph.

None of them helped.

What I want is to set the position of the label to the center of the collapsed subgraph.

I guess I’ll have to see the code on this one. Wrap this up in as small a sample as you can that I can build and run, but that reproduces the problem. Send that to “godiagram”. (at this domain)