[DefaultMember("Item")] [Serializable()] public class GoGeneralNode : GoNode, IGoCollection, IGoGraphPart, IGoIdentifiablePart, IGoLabeledNode, IGoLabeledPart, IGoNode, IGoNodeIconConstraint
[DefaultMember("Item")] [Serializable()] public class GoGeneralNode : GoNode, IGoCollection, IGoGraphPart, IGoIdentifiablePart, IGoLabeledNode, IGoLabeledPart, IGoNode, IGoNodeIconConstraint
Be sure to call the Initialize method to create all of the standard parts by calling the various Create... methods. You can override those methods to customize the appearance or behavior of those parts.
The positions of the GoGeneralNodePorts relative to the icon are determined by the LayoutLeftPorts and LayoutRightPorts methods. If you want to customize how the ports are laid out, you can override these methods. For simple customization, you can set the LeftPortsAlignment and RightPortsAlignment properties to specify whether the port should go outside, straddle, or go inside of the icon's edge.
The positions of the GoGeneralNodePortLabels relative to the port are determined by the GoGeneralNodePort.GoGeneralNodePort.LayoutLabel method. However, you can set the LeftPortLabelsInside, RightPortLabelsInside, LeftPortsLabelSpacing, and RightPortsLabelSpacing properties on the node to customize the default layout for all port labels.
If you don't want the ports to have labels at all, override CreatePortLabel to return null/Nothing.
If you want ports at the top and at the bottom of the icon, with optional labels at either left or right sides, set the Orientation to Orientation.Vertical
. "Left" ports will go on top; "right" ports will go underneath the icon.
You can add ports at any time by calling MakePort and then calling either Add or InsertLeftPort or InsertRightPort. You can remove ports at any time by calling GoGroup.Remove.
The Icon is normally a GoNodeIcon, but can be any kind of GoObject. Setting the GoNode.Location, GoNode.Resizable, GoNode.Reshapable and GoNode.Shadowed properties actually sets the same properties on the SelectionObject, which is the Icon.