API:System.Contnrs.TComponentList.IndexOfItem
Delphi
function IndexOfItem(AComponent: TComponent; ADirection: TList.TDirection): NativeInt; inline;
C++
HIDESBASE System::NativeInt __fastcall IndexOfItem(System::Classes::TComponent* AComponent, System::Types::TDirection ADirection);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Contnrs.pas System.Contnrs.hpp |
System.Contnrs | TComponentList |
Description
Returns the item's index.
System.Contnrs.TComponentList.IndexOfItem inherits from System.Classes.TList.IndexOfItem. All content below this line refers to System.Classes.TList.IndexOfItem.
Returns the item's index.
Call IndexOfItem to determine the location of an item in the TList list, using a linear search. If the item is not found, -1 is returned.