GoDiagram Web Reference
LayoutHandle Method

This positions the handle within the group.
Syntax
'Declaration
 
Public Overridable Sub LayoutHandle() 
public virtual void LayoutHandle()
Remarks
By default this places the handle at the top left corner of the group, inside the margin. This method does nothing if the node is not IsExpanded.
Example

To place the handle in the margin at the top-left corner, rather than the default position inside the margins:

              public override void LayoutHandle() {
                if (!this.IsExpanded) return;
                GoSubGraphHandle h = this.Handle;
                if (h != null) {
                  RectangleF b = ComputeBorder();
                  // top-left, in the margins
                  h.Position = new PointF(b.X, b.Y);
                }
              }
            

To place the handle at the top-right corner, you could implement these overrides:

              public override void LayoutHandle() {
                if (!this.IsExpanded) return;
                GoSubGraphHandle h = this.Handle;
                if (h != null) {
                  RectangleF b = ComputeInsideMargins(null);
                  // top-right, inside margin
                  h.SetSpotLocation(TopRight, GetRectangleSpotLocation(b, TopRight));
                }
              }
            
              // Make sure the collapsed subgraph body (including any CollapsedObject)
              // is positioned to the left of the handle.
              protected override RectangleF ComputeCollapsedRectangle(SizeF s) {
                PointF hpos = ComputeReferencePoint();
                return new RectangleF(hpos.X + this.Handle.Width - s.Width, hpos.Y, s.Width, s.Height);
              }
            

For more examples, see the classes in the SubGraphApp sample.

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