GoDiagram Win Reference
CreatePort Method (GoMultiTextNode)
Example 

Create and initialize a port that may go on either the left side or the right side.
Syntax
'Declaration
 
Public Overridable Function CreatePort( _
   ByVal left As Boolean, _
   ByVal idx As Integer _
) As GoObject
public virtual GoObject CreatePort( 
   bool left,
   int idx
)

Parameters

left
idx

Return Value

by default, a GoPort
Example
If you override this method, you may want the definition to do some of the things that the standard definition does:
public virtual GoObject CreatePort(bool left, int idx) {
  GoPort p = new GoPort();
  p.Size = new SizeF(3, 5);
  p.Style = GoPortStyle.None;
  if (left) {
    p.FromSpot = MiddleLeft;
    p.ToSpot = MiddleLeft;
  } else {
    p.FromSpot = MiddleRight;
    p.ToSpot = MiddleRight;
  }
  return p;
}
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

GoMultiTextNode Class
GoMultiTextNode Members

 

 


© 2015. Northwoods Software Corporation. All Rights Reserved.

Send Feedback