System.Contnrs.TCustomBucketList.Data

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Data[AItem: Pointer]: Pointer read GetData write SetData; default;

C++

__property void * Data[void * AItem] = {read=GetData, write=SetData/*, default*/};

Properties

Type Visibility Source Unit Parent
property public
System.Contnrs.pas
System.Contnrs.hpp
System.Contnrs TCustomBucketList

Description

Represents the data associated with a specified item in the bucket list.

Use Data to get or set the data associated with an item in the bucket list.

AItem points to an item currently in the bucket list. If AItem does not specify an item in one of the buckets of the bucket list, trying to read or set Data causes TCustomBucketList to raise an EListError exception.

Note: In Delphi, Data is the default property of TCustomBucketList. This means that the property name can be omitted when using this property. For example, the following two lines of code are both acceptable and do the same thing:

BucketList1.Data[Name as Pointer] := Pointer(Form1.FindChildControl(Name)); BucketList1[Name as Pointer] := Pointer(Form1.FindChildControl(Name));

Note: In C++, Data can be accessed using the [] operator, to achieve an effect similar to the default property in Delphi.

See Also