Vcl.ComCtrls.TCustomListView.GetItemIndex

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

function GetItemIndex(Value: TListItem): Integer; reintroduce; overload;
function GetItemIndex: Integer; reintroduce; overload; override;

C++

HIDESBASE int __fastcall GetItemIndex(TListItem* Value)/* overload */;
virtual int __fastcall GetItemIndex()/* overload */;

プロパティ

種類 可視性 ソース ユニット
function protected
Vcl.ComCtrls.pas
Vcl.ComCtrls.hpp
Vcl.ComCtrls TCustomListView

説明

指定された項目の Items プロパティ配列でのインデックスを返します。

GetItemIndex メソッドを呼び出すとリスト項目の位置を調べられます。0 ならば最初の項目を示し,1 ならば 2 番めの項目を示します。Value パラメータで指定された項目がリストビューに入っていない場合,GetItemIndex は -1 を返します。Value パラメータが省略された場合,Selected 項目のインデックスが返されます。

関連項目