Skip to main content

TcxCustomTreeView.OnCreateNodeClass Event

Enables you to supply custom node types to the tree view control.

Declaration

property OnCreateNodeClass: TTVCreateNodeClassEvent read; write;

Remarks

The OnCreateNodeClass event fires before a node is added to the control. It is raised when calling the Add method of the TTreeNodes class representing the control’s Items property. You can handle this event to specify the type of the that will represent the added node. The type must be a TTreeNode descendant.

Sender specifies the TcxCustomInnerTreeView.

The node class to be added must be assigned to the NodeClass parameter of the event.

Handle the OnCreateNodeClass event if you need additional node settings as compared to the TTreeNode class. For instance, you may want to specify different font style for each node and use them when handling the OnCustomDrawItem event.

See Also