GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoGroup Class / Add Method
In This Topic
    Add Method (GoGroup)
    In This Topic
    Add an object to this group.
    Syntax
    public virtual void Add( 
       GoObject obj
    )

    Parameters

    obj
    Remarks
    The obj must not already belong to another group or to a layer. If the object already belongs to this group, nothing happens. Otherwise, afterwards, the obj's GoObject.Parent will be this group and its GoObject.GoObject.Layer will be the same as this group's layer. When you add an object to a group, you will normally make that child object not GoObject.GoObject.Selectable. If the child is supposed to be selectable, you need to consider whether users can move or copy the child on its own, or whether this parent group should be moved or copied instead. For the latter case you should set the GoObject.GoObject.DragsNode property to true for each such child, so that GoObject.GoObject.DraggingObject will return the child's parent node. If instead you want to allow selected children to be able to move on their own, you should make sure LayoutChildren does not control the positioning of these child objects.
    See Also