Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxListBox.OnData Event

In This Article

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

#Declaration

Delphi
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