RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomBucketList.Data Property

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

Pascal
property Data [AItem: Pointer]: Pointer;
C++
__property void * Data[void * AItem];

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 affect similar to the default property in Delphi.
 

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