[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Default routine used to returns a numeric value with the sort order for the specified tree nodes.
Source position: comctrls.pp line 3075
public function TTreeNode.DefaultTreeViewSort( |
Node1: TTreeNode; |
Node2: TTreeNode |
):Integer; |
Node1 |
|
Tree node compared in the method. |
Node2 |
|
Tree node compared in the method. |
Numeric value with the relative sort order for the compared nodes.
DefaultTreeViewSort is the default routine used to compare tree nodes to determine their sort order. DefaultTreeViewSort is used in the CustomSort method when a another comparison routine has not been specified in the argument for the method. It is passed as an argument to the Sort routine in the implementation section for the unit.
DefaultTreeViewSort checks for an assigned OnCompare event handler in the TreeView control for the nodes. When assigned, it is signalled to compare the specified nodes to determine the return value for the method. If TreeView or its OnCompare handler have not been assigned, the text for the nodes in Node1 and Node2 are compared to get the return value. The return values contains the following:
On UNIX-like platforms, the CompareStr routine is called to compare the values for the Text in the nodes. The comparison is case-sensitive. All other platforms call the AnsiCompareStr routine to compare the Text values. AnsiCompareStr handles ANSI characters which include accented characters. The comparison is case-sensitive.
|
CustomSort - Sorts the child nodes using SortProc. |
|
|
TTreeNodeCompare - generic function to compare Tree Nodes: returns -1 if Node1 is less than Node2, zero if equal, +1 if Node1 is greater. |
|
|
Event handler signalled to compare and sort tree nodes in their default order. |
Version 3.2 | Generated 2024-02-25 | Home |