Skip to main content

TcxListBox.OnData Event

Enables you to supply captions of items when working in virtual mode.

Declaration

property OnData: TLBGetDataEvent read; write;

Remarks

The list box control can operate in virtual mode, where you supply item captions not via the Items property but by handling the OnData event handler. To set the list box into this mode the ListStyle property must be set to lbVirtual or lbVirtualOwnerDraw. Note, that handling the OnData event also results in populating the Items list, but in a different manner.

Control specifies the TcxInnerListBox.

Index specifies the index of the item whose caption needs to be supplied. The caption must be assigned to the Data parameter.

Note, that when working in the virtual mode, you need to set the Count property value to a positive integer. This property specifies the number of items, and thus the number of times the OnData event fires.

See Also