GoDiagram Web Reference
LayoutLabel Method (GoSubGraph)

This positions the Label within the group, according to the LabelSpot or CollapsedLabelSpot.
Syntax
'Declaration
 
Public Overridable Sub LayoutLabel() 
public virtual void LayoutLabel()
Remarks

When the LabelSpot refers to a corner, the Label is actually positioned above or below the subgraph, much like headers or footers in a page layout. Furthermore, when the LabelSpot is TopLeft, if there is a Handle and it is at exactly the same position, the label is shifted right to avoid the overlap. If this node is not IsExpanded, the label is positioned according to the CollapsedLabelSpot. If there is a CollapsedObject the label is positioned relative to that collapsed object; otherwise it is positioned relative to the result of ComputeCollapsedRectangle.

You can override this method to locate the label in customized places. But note that the default behavior of ComputeInsideMarginsSkip is to include the Label in the background/border decoration as computed by ComputeBorder. If you want the label to be positioned outside of the border decoration, you will need to override ComputeInsideMarginsSkip as follows:

            protected override bool ComputeInsideMarginsSkip(GoObject child) {
              if (child == this.Label && this.IsExpanded) return true;
              return base.ComputeInsideMarginsSkip(child);
            }
            
This example override will cause the Label not to necessarily be inside the border when the subgraph is expanded.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GoSubGraph Class
GoSubGraph Members

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback