GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoBoxNode Class
In This Topic
    GoBoxNode Class
    In This Topic
    A GoBoxNode has a single rectangular port that surrounds another object, named the Body. This is most useful when that body object is basically rectangular, and when links can connect at any side, determined dynamically.

    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.

    See Also