Back to Devexpress

TdxTreeViewNodeCompareProc Type

vcl-dxtreeview-7e1f8e75.md

latest1.5 KB
Original Source

TdxTreeViewNodeCompareProc Type

A callback reference to a function that compares two tree nodes.

Declaration

delphi
TdxTreeViewNodeCompareProc = function(ANode1: TdxTreeViewNode; ANode2: TdxTreeViewNode; AData: TdxNativeInt): Integer;

Parameters

NameTypeDescription
ANode1TdxTreeViewNode

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.

|

Referenced Class

TypeDescription
Integer

A result of the comparison.

|

Remarks

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

dxTreeView Unit