Skip to main content

TdxCustomOrgChart.AddChild(TdxOcNode,TdxOcNodeData) Method

Adds a new child node to a specified node.

Declaration

function AddChild(Node: TdxOcNode; Data: TdxOcNodeData): TdxOcNode;

Parameters

Name Type
Node TdxOcNode
Data TdxOcNodeData

Returns

Type
TdxOcNode

Remarks

Call this function to place a newly created child node as the last child of a node passed as the Node parameter. The AddChild function returns the child node object. Pass a pointer to custom data or nil as the Data parameter to initialize the created child node’s Data property.

To add a new node as an existing node’s sibling, invoke the Add function instead.

Calling the AddChild function raises the OnCreateNode event.

See Also