API:System.Contnrs.TComponentList.IndexOf
Delphi
function IndexOf(AComponent: TComponent): Integer; inline;
C++
HIDESBASE int __fastcall IndexOf(System::Classes::TComponent* AComponent);
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | System.Contnrs.pas System.Contnrs.hpp |
System.Contnrs | TComponentList |
説明
指定した値を持つ,リスト内の最初のオブジェクトのインデックスを返します。
System.Contnrs.TComponentList.IndexOf は System.Contnrs.TObjectList.IndexOf を継承しています。以下の内容はすべて System.Contnrs.TObjectList.IndexOf を参照しています。
指定した値を持つ,リスト内の最初のオブジェクトのインデックスを返します。
IndexOf オブジェクトを呼び出すと,リスト内の指定オブジェクトのインデックスを取得できます。最初のオブジェクトは 0,2 番めのオブジェクトは 1 というようにインデックス付けされます。オブジェクトがリストにない場合,IndexOf メソッドは -1 を返します。オブジェクトが複数見つかった場合,IndexOf は,最初に検出したオブジェクトのインデックスを返します。