Sign in Join
FPDoc Onlineexperiment

TCustomTreeView.OnCollapsing property

Member of TCustomTreeViewprotectedIn unit ComCtrls

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

Declaration

pascal
property OnCollapsing: TTVCollapsingEvent read FOnCollapsing write FOnCollapsing;

Description

OnCollapsing is a TTVCollapsingEvent property with the event handler signalled prior to collapsing a node on the tree view control.

The Sender argument is the tree view control for the event notification.

Node contains the TTreeNode instance to be collapsed.

AllowCollapse is a variable argument which indicates if the tree node can (or should) be collapsed on the tree view control.

OnCollapsing is signalled from the CanCollapse method (when assigned), and occurs when the Expanded property in a tree node is changing from True to False. The value returned in AllowCollapse is used as the return value for the CanCollapse method. Setting AllowCollapse to False in the handler routine prevents the tree node from being collapsed.

Use OnCollapsed to perform actions needed after a tree node has been collapsed on the control.

See also

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