GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoMultiTextNode Class / CreatePort Method
Example
In This Topic
    CreatePort Method (GoMultiTextNode)
    In This Topic
    Create and initialize a port that may go on either the left side or the right side.
    Syntax
    public virtual GoObject CreatePort( 
       bool left,
       int idx
    )

    Parameters

    left
    idx

    Return Value

    by default, a GoPort
    Remarks
    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;
    }
    See Also