Back to Devexpress

TdxCustomOrgChart.AddFirst(TdxOcNode,TdxOcNodeData) Method

vcl-dxorgchr-dot-tdxcustomorgchart-dot-addfirst-x28-dxorgchr-dot-tdxocnode-dxorgchr-dot-tdxocnodedata-x29.md

latest1.6 KB
Original Source

TdxCustomOrgChart.AddFirst(TdxOcNode,TdxOcNodeData) Method

Adds a new node to the tree structure.

Declaration

delphi
function AddFirst(Node: TdxOcNode; Data: TdxOcNodeData): TdxOcNode;

Parameters

NameType
NodeTdxOcNode
DataTdxOcNodeData

Returns

Type
TdxOcNode

Remarks

Call this function to place a newly created node as the first sibling of a node passed as the Node parameter. Passing nil instead of a tree node results in appending a node to the root level. The Add function returns the node object. Pass a pointer to custom data or nil as the Data parameter to initialize the created node’s Data property.

To append a new node as a child instead of a sibling to the specified node, call the AddChild function.

Calling the AddFirst function raises the OnCreateNode event.

See Also

TdxCustomOrgChart.AddChildFirst

TdxCustomOrgChart.Insert

TdxCustomOrgChart Class

TdxCustomOrgChart Members

dxorgchr Unit