Sign in Join
FPDoc Onlineexperiment

TCustomTreeView.OnExpanding property

Member of TCustomTreeViewprotectedIn unit ComCtrls

Event handler signalled prior to expanding a node on the tree view control.

Declaration

pascal
property OnExpanding: TTVExpandingEvent read FOnExpanding write FOnExpanding;

Description

OnExpanding is a TTVExpandingEvent property with the event handler signalled before a tree node is expanded on the tree view control. It is signalled (when assigned) from the CanExpand method, and allows the application to perform actions needed before the tree node is expanded to reveal its child nodes.

Arguments for the event handler include:

Sender
Object instance (TCustomTreeView) for the event.
Node
The TTreeNode instance to be expanded on the tree view control.
AllowExpansion
Boolean variable argument which indicates whether the tree node can be expanded on the control. Set AllowExpansion to False to prevent expansion of the tree node.

OnExpanding is not signalled if the tree node does not have any child nodes (HasChildren is False).

Use OnExpanded to perform actions needed after a tree node has been expanded on the control.

Use OnCollapsing and OnCollapsed to perform actions before or after a node is collapsed on the tree view control.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.