RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TStrings.IndexOfObject Method

Returns the index of the first string in the list associated with a given object.

Pascal
function IndexOfObject(AObject: TObject): Integer; virtual;
C++
virtual __fastcall int IndexOfObject(TObject * AObject);

Call IndexOfObject to locate the first string in the list associated with the object AObject. Specify the object you want to locate as the value of the AObject parameter. IndexOfObject returns the 0-based index of the string and object. If the object is not associated with any of the strings, IndexOfObject returns -1. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!