API: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

説明

ItemIndex プロパティの値を返します。

Vcl.ComCtrls.TCustomListView.GetItemIndex は Vcl.Controls.TCustomListControl.GetItemIndex を継承しています。以下の内容はすべて Vcl.Controls.TCustomListControl.GetItemIndex を参照しています。

ItemIndex プロパティの値を返します。

GetItemIndex メソッドをオーバーライドすると,ItemIndex プロパティを読み取るための実装を提供できます。GetItemIndex は,選択されている項目のインデックスを返します。リストの 1 番めの項目のインデックスが 0,2 番めの項目のインデックスが 1 で,以後もインデックスが順次割り当てられます。項目が選択されていない場合,GetItemIndex は -1 を返します。リストコントロールが複数の項目の選択をサポートする場合,GetItemIndex は,フォーカスのある選択対象項目のインデックスを返します。

関連項目