Sign in Join
FPDoc Onlineexperiment

TTreeView.OnCompare property

Member of TTreeViewpublishedIn unit ComCtrls

Event handler signalled to compare and sort tree nodes in their default order.

Declaration

pascal
property OnCompare:;

Description

OnCompare is a TTVCompareEvent property with the event handler signalled to compare nodes on the tree view control. It is signalled (when assigned) to determine the sort order for tree nodes in the DefaultTreeViewSort method. Arguments to the event handler include:

Sender
The tree view control for the event.
Node1, Node2
The tree nodes compared in the handler routine.
Compare
An Integer value with the relative sort order for the compared nodes. <0 indicates that Node1 comes before Node2 in the sort order. <0 indicates that Node1 comes after Node2 in the sort order. 0 means that Node1 and Node2 have the same value in the sort order.

If OnCompare is not assigned, the sort order for tree nodes is determined using the AnsiCompareStr (on Windows) or CompareStr (on UNIX-like platforms) routines.

This description is the one of ComCtrls.TCustomTreeView.OnCompare.

See also

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