RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TStaticListAction.OnGetItem Event

Occurs when the static list action supplies an item to its client controls.

Pascal
property OnGetItem: TGetItemEvent;
C++
__property TGetItemEvent OnGetItem;

Write an OnGetItem event handler to customize the properties of an item before it is supplied to client controls. The GetItem method generates an OnGetItem event for every item it supplies to clients, passing in the current item from the Items property. You can change that item's properties in the event handler before it is added to client controls.  

Sender is the list action that is supplying data to client controls. 

Index indicates which item is requested, where 0 is the first item, 1 is the second item and so on up to the index that is one less than the value of the Count property.  

Item is the item that the action is about to supply to the user. You can change any of its properties before it is passed on to the action's client. 

 

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