Skip to main content

TdxListViewCompareProc Type

A callback reference to a function that compares two list items.

Declaration

TdxListViewCompareProc = function(AItem1: TdxListItem; AItem2: TdxListItem; AData: TdxNativeInt): Integer;

Parameters

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.

Referenced Class

Type Description
Integer

The result of the comparison.

Remarks

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