Skip to main content

TcxCustomTreeList.AddNode(TcxTreeListNode,TcxTreeListNode,Pointer,TcxTreeListNodeAttachMode) Method

In unbound mode, adds a node to the control at the specified position.

Declaration

function AddNode(ANode: TcxTreeListNode; ARelative: TcxTreeListNode; AData: Pointer; AttachMode: TcxTreeListNodeAttachMode): TcxTreeListNode; virtual;

Parameters

Name Type
ANode TcxTreeListNode
ARelative TcxTreeListNode
AData Pointer
AttachMode TcxTreeListNodeAttachMode

Returns

Type
TcxTreeListNode

Remarks

This function returns the added node. After the node has been added, the tree list sorts nodes (if sorting is in effect).

ANode specifies the node to be added. If ANode is nil, a new node will be created.

ARelative specifies the parent node. If ARelative is nil, ANode will be added to the root node (see the tree list’s Root property).

AData specifies the custom data associated with the node (see the node’s Data property).

AttachMode specifies the node’s position in the parent’s child collection.

Note

The AddNode function is only used in the unbound mode. In bound and provider modes, a node is added by means of a data store. Alternatively, you can also use the node’s AddChild or AddChildFirst methods for this purpose.

See Also