API:System.Contnrs.TComponentList.IndexOfItem
Delphi
function IndexOfItem(AComponent: TComponent; ADirection: TList.TDirection): Integer; inline;
C++
HIDESBASE int __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. {{#multireplace:System.Contnrs.TComponentList.IndexOfItem|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} inherits from {{#multireplace:System.Classes.TList.IndexOfItem|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}. All content below this line refers to {{#multireplace:System.Classes.TList.IndexOfItem|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}.
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.