GoDiagram Web Reference
CreatePort Method (GoIconicNode)
Example 

Create and initialize the node's port, which is normally not visible and at the middle of the icon.
Syntax
'Declaration
 
Protected Overridable Function CreatePort() As GoPort
protected virtual GoPort CreatePort()

Return Value

Remarks
IsValidFrom and IsValidTo are true, by default, thus allowing users to draw links from or to these nodes. You may want to set those properties to false if you want prevent users from drawing links with a mouse-down and drag from the port, or to create a port with a different size or appearance.
Example
If you override this method, you may want the definition to do some of the things that the standard definition does:
protected virtual GoPort CreatePort() {
  GoPort p = new GoPort();
  p.Style = GoPortStyle.None;
  p.Size = new SizeF(6, 6);
  p.FromSpot = NoSpot;
  p.ToSpot = NoSpot;
  p.PortObject = this;
  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

GoIconicNode Class
GoIconicNode Members

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback