System.Classes.TCollection.GetItemAttr

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

DYNAMIC System::UnicodeString __fastcall GetItemAttr(int Index, int ItemIndex);

Properties

Type Visibility Source Unit Parent
function protected
System.Classes.pas
System.Classes.hpp
System.Classes TCollection

Description

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

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, which is a string. GetItemAttr returns the value of one of these attributes for a specified item in the collection.

Index identifies which of the attribute's values 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.

See Also