TListItems.IndexOf function
Gets the ordinal position in the container for the specified list item.
Declaration
function IndexOf(const AItem: TListItem): IntegerArguments
AItem | TListItem instance to locate in the container. |
Function result
Ordinal position in the container for the specified list item, or -1 when not found.
Description
If the container has cached items, the cache index for the list item in AItem is used as the return value. If a cached entry is not already assigned, the IndexOf method in the internal storage is called locate the specified list item.
The return value is -1 if the specified list item is not found in the container.
The list item and its position in the list are stored in the internal cache for subsequent use in the container.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
