[Overview][Types][Classes][Procedures and functions][Index] |
Implements a comparison function for items in the collection.
Source position: comboex.pas line 103
protected function TListControlItems.CompareItems( |
AItem1: TListControlItem; |
AItem2: TListControlItem |
):Integer; virtual; |
AItem1 |
|
First list item for the comparison. |
AItem2 |
|
Second list item for the comparison. |
Relative sort order for the compared items
CompareItems is an Integer function used to perform a comparison for items in the collection. AItem1 and AItem2 contains the list items compared in the method.
CompareItems uses the value in CaseSensitive to determine if the comparison of captions value uses case sensitivity. When CaseSensitive is True, caption values are converted to lowercase prior to performing the comparison.
CompareItems calls CompareStr to perform a comparison for the Captions assigned for the specified list items. The return value contains the relative sort order for the items calculated as a difference between the ASCII values for characters in the item captions. For example:
CompareItems is used in the implementation of the Sort method when SortType contains the value stText or stBoth.
Use the OnCompare event handler when SortType contains stData or stBoth.
|
Indicates if case sensitivity is used when comparing items in the collection. |
|
|
Performs the Sort routine required for the setting in SortType. |
|
|
Determines the comparison mechanism used for collection items in the Sort method. |
|
Version 4.0 | Generated 2025-05-03 | Home |