Northwoods.Go Assembly > Northwoods.Go Namespace : GoBoxNode Class |
'Declaration <SerializableAttribute()> Public Class GoBoxNode Inherits GoNode Implements IGoCollection, IGoGraphPart, IGoIdentifiablePart, IGoLabeledNode, IGoLabeledPart, IGoNode
[SerializableAttribute()] public class GoBoxNode : GoNode, IGoCollection, IGoGraphPart, IGoIdentifiablePart, IGoLabeledNode, IGoLabeledPart, IGoNode
This class uses a GoBoxPort to allow links to come in orthogonally and (optionally) be positioned intelligently apart from each other. The Port is slightly larger than the Body, so that it appears as if it were a border for the body object. Thus users can start drawing links by mouse-down and dragging along the edge of the GoBoxNode. You can customize the appearance of that "border" by setting the Port's properties. For example: GoBoxNode node1 = new GoBoxNode(); node1.Text = "box node\n1"; node1.Label.Alignment = GoObject.Middle; node1.Port.PenColor = Color.Black; node1.Port.BrushColor = Color.Pink; node1.PortBorderMargin = new SizeF(6, 6); node1.LinksPointsSpread = true;
The Body is normally a GoText, but could be any kind of GoObject, including complex GoGroups. In this case you may find it advantageous to override the GoNode.Label property to return (and possibly to set) the appropriate GoText object inside your group.
As you connect links to this node's Port, when LinkPointsSpread is true, other links on the same side are not actually spread out until you either move the node or call UpdateAllLinkPoints.
System.Object
Northwoods.Go.GoObject
Northwoods.Go.GoGroup
Northwoods.Go.GoNode
Northwoods.Go.GoBoxNode
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