RAD Studio VCL Reference
TCollection.GetItemAttr Method

Returns the value of a custom attribute assigned to one of the collection's items.

function GetItemAttr(Index: Integer; ItemIndex: Integer): string; dynamic;
__fastcall AnsiString GetItemAttr(int Index, int ItemIndex);

TCollection descendants can associate user-defined attributes with the items in the collection. Each attribute has a name and, for each item in the collection, a value that is a string. GetItemAttr returns the value of one of these attributes for a specified item in the collection. 

Index identifies which attribute's value is desired. This is a value between 0 and n-1, where n is the value returned by GetAttrCount

ItemIndex identifies the item whose attribute value is desired. This is an index into the Items property array. 

As implemented in TCollection, GetItemAttr always returns an empty string, because TCollection defines no custom attributes. 


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