RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomListView.GetItemIndex Method ()

Returns the index of the specified item in the Items property array.

Pascal
function GetItemIndex(Value: TListItem): Integer; overload; reintroduce;
function GetItemIndex: Integer; override; overload; reintroduce;
C++
__fastcall int GetItemIndex(TListItem Value);
virtual __fastcall int GetItemIndex();

Call GetItemIndex to determine the position of a list item, where 0 is the index of the first item, 1 is the index of the second item, and so on. If the item specified by the Value parameter is not in the list view, GetItemIndex returns -1. If the Value parameter is omitted, the index of the Selected item is returned. 

 

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