TListItemsCompare procedure type
Specifies a function type used to compare items in TComboEx.
Declaration
TListItemsCompare = function(AList: TListControlItems; AItem1: Integer;
AItem2: Integer): IntegerArguments
AList | Collection with the items compared in the routine. |
AItem1 | Ordinal position for the first item in the comparison. |
AItem2 | Ordinal position for the second item in the comparison. |
Function result
Integer with the relative order for the compared values at the specified positions.
Description
TListItemsCompare is an
Integer function type used to
implement a comparison between the items stored at the specified positions in
AList. The return value contains the relative sort order for the
compared values, for example:
- -1
- Aitem1 occurs before AItem2
- 0
- AItem1 and AItem2 have the same values
- 1
- AItem1 occurs after AItem2
TListItemsCompare implements the sort operation performed in
TListControlItems when its CustomSort method is called.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
