RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomListBox.GetItemIndex Method

Returns the value of the ItemIndex property.

Pascal
function GetItemIndex: Integer; override;
C++
virtual __fastcall int GetItemIndex();

GetItemIndex is the protected read implementation of the ItemIndex property. It returns the index of the first selected item in the list box. 

The first item in the list has index 0, the second item has index 1, and so on. If no item is selected, the value of ItemIndex is -1. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!