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 プロパティの値を返します。 {{#multireplace:Vcl.ComCtrls.TCustomListView.GetItemIndex|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} は {{#multireplace:Vcl.Controls.TCustomListControl.GetItemIndex|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} を継承しています。以下の内容はすべて {{#multireplace:Vcl.Controls.TCustomListControl.GetItemIndex|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} を参照しています。

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

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

関連項目