GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoTextNode Class
Members
In This Topic
    GoTextNode Class
    In This Topic
    A node displaying a string with a background and four ports, one at the middle of each side.
    Syntax
    Remarks

    If you don't need all four ports, you can remove ones you don't want by setting the corresponding property to null.

    You can change the background from a light-gray rectangle by setting the Background property to be some other object. In order for the text to fit nicely within the shape, you may need to set the TopLeftMargin and BottomRightMargin properties to larger values. This is particularly true if the new shape is a GoEllipse or a polygon that has a small rectangular area in it.

    When AutoResizes is false, the Label is sized to fit inside the bounds of the Background, minus the margins. The label (a GoText) is automatically wrapped and clipped.

    To make it easier to initialize or modify the shape's brush and/or pen, the Shape property casts the Background to a GoShape. If you make the background a group of various kind of objects, you may want to override the Shape property to return the particular shape inside the group that you consider to be the most prominent.

    The text string is normally multiline and not editable, but you can change those and other properties by setting the Label's properties.

    Setting the Shadowed property for this node actually sets that property on the Background object. Although the Background object is normally a GoRectangle, it could be any kind of GoObject.

    See Also