RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCollection.GetAttr Method

Returns the name of a custom attribute that can be retrieved using the GetItemAttr method.

Pascal
function GetAttr(Index: Integer): string; dynamic;
C++
__fastcall AnsiString GetAttr(int Index);

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. The GetAttr method returns the name of an attribute. 

Index identifies the attribute whose name is requested. This is a value between 0 and n-1, where n is the value returned by GetAttrCount

As implemented by TCollection, GetAttr 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!