GoSubGraph collapsed size

I have a GoSubGraph object which I would like to always be the same size whenever it is collapsed, regardless of how big the child objects are within it. Is this even possible?

I tried using:

public override SizeF ComputeCollapsedSize(bool visible)
SizeF staticSizw = new SizeF(80, 20);
return staticSizw;

but the collapsed size is the smallest rectangle that will hold all child nodes.

Hoping I am just missing something or there is an easy workaround.


You could try using a GoSubGraph.CollapsedObject to make sure the collapsed subgraph is the size you want. The following code does that by using a GoRectangle that doesn’t paint anything.

<pre =“BBcode” style="width: 1211.9000244140625px; "> protected override GoObject CreateCollapsedObject() {
GoRectangle r = new GoRectangle();
r.Brush = null;
r.Pen = null;
r.Size = new SizeF(100, 20); // big enough to surround the Label
r.Selectable = false;
return r;

Thanks so much Jake… this worked perfectly.

Very much appreciated!