vcl-dxtreeview-7e1f8e75.md
A callback reference to a function that compares two tree nodes.
TdxTreeViewNodeCompareProc = function(ANode1: TdxTreeViewNode; ANode2: TdxTreeViewNode; AData: TdxNativeInt): Integer;
| Name | Type | Description |
|---|---|---|
| ANode1 | TdxTreeViewNode |
The first target tree node.
| | ANode2 | TdxTreeViewNode |
The second target tree node.
| | AData | TdxNativeInt |
Specifies a pointer to additional data for the custom comparison routine.
|
| Type | Description |
|---|---|
| Integer |
A result of the comparison.
|
The following table lists the values that a comparison function can return:
|
Value
|
Description
| | --- | --- | |
A negative integer value
|
ANode1 is positioned above ANode2.
| |
0
|
ANode1 is “equal” to ANode2. Both nodes retain their positions.
| |
A positive integer value
|
ANode1 is positioned below ANode2.
|
The Tree View’s CustomSort function references the TdxTreeViewNodeCompareProc type.
See Also