Vcl.Controls.TCustomListControl.GetItemIndex

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetItemIndex: Integer; virtual; abstract;

C++

virtual int __fastcall GetItemIndex() = 0 ;

Properties

Type Visibility Source Unit Parent
function protected
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TCustomListControl

Description

Returns the value of the ItemIndex property.

Override GetItemIndex to provide the read implementation for the ItemIndex property. GetItemIndex returns the index of the selected item, where the first item in the list has index 0, the second item has index 1, and so on. If no item is selected, GetItemIndex returns -1. If the list control supports multiple selected items, GetItemIndex returns the index of the selected item that has focus.

See Also