TCustomTreeView.OnCreateNodeClass property
Event handler signalled to get the class reference used to create new tree nodes.
Declaration
property OnCreateNodeClass: TTVCreateNodeClassEvent read FOnCreateNodeClass write FOnCreateNodeClass;Description
OnCreateNodeClass is signalled (when assigned) when the CreateNode
method is executed for the tree view control.
OnCreateNodeClass occurs after the OnCustomCreateItem event handler has been signalled to get a TTreeNode for the purpose. If its return value is Nil, DoCreateNodeClass is called to signal OnCreateNodeClass. It is not signalled if a return value was assigned in the OnCustomCreateItem handler routine.
Sender contains the tree view control for the event handler.
NodeClass is used to return the class reference needed to create a new node for the control.
A new instance of the class type is created and added to the node collection in Items.
See also
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
