GoDiagram Win Reference
CreateLabel Method (GoGeneralNode)
Example 

a null value causes no label to be allocated
Create and initialize a text label for either the top or the bottom.
Syntax
'Declaration
 
Protected Overridable Function CreateLabel( _
   ByVal top As Boolean, _
   ByVal text As String _
) As GoText
protected virtual GoText CreateLabel( 
   bool top,
   string text
)

Parameters

top
text
a null value causes no label to be allocated

Return Value

an editable, non-selectable, middle-aligned, non-rescaling GoText object
Example
If you override this method, you may want the definition to do some of the things that the standard definition does:
protected virtual GoText CreateLabel(bool top, String text) {
  GoText l = null;
  if (text != null) {
    l = new GoText();
    l.Text = text;
    l.Selectable = false;
    if (this.Orientation == Orientation.Vertical) {
      if (top)
        l.Alignment = MiddleRight;
      else
        l.Alignment = MiddleLeft;
    } else {
      if (top)
        l.Alignment = MiddleBottom;
      else
        l.Alignment = MiddleTop;
    }
    l.Editable = true;
    this.Editable = true;
  }
  return l;
}
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

GoGeneralNode Class
GoGeneralNode Members

 

 


© 2015. Northwoods Software Corporation. All Rights Reserved.

Send Feedback