TCustomTreeView.OnCompare property
Event handler signalled to compare and sort tree nodes in their default order.
Declaration
property OnCompare: TTVCompareEvent read FOnCompare write FOnCompare;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.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
