Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomTreeView.OnCreateNodeClass Event

In This Article

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

#Declaration

Delphi
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