vcl-dxlistview-e2824b65.md
A callback reference to a function that compares two list items.
TdxListViewCompareProc = function(AItem1: TdxListItem; AItem2: TdxListItem; AData: TdxNativeInt): Integer;
| Name | Type | Description |
|---|---|---|
| AItem1 | TdxListItem |
The first target list item.
| | AItem2 | TdxListItem |
The second target list item.
| | AData | TdxNativeInt |
Specifies a pointer to additional data for the custom comparison routine.
|
| Type | Description |
|---|---|
| Integer |
The result of the comparison.
|
The following table lists the values that a comparison function can return:
| Value | Description |
|---|---|
| A negative integer value | AItem1 is positioned before AItem2. |
| 0 | AItem1 is positioned before AItem2. |
| A positive integer value | AItem is positioned after AItem2. |
The List View’s CustomSort function references the TdxListViewCompareProc type.
See Also