Skip to main content

TcxListBox.OnMeasureItem Event

Enables you to assign a custom height to each individual item.

Declaration

property OnMeasureItem: TcxListBoxMeasureItemEvent read; write;

Remarks

The OnMeasureItem event fires if the ListStyle property is set to lbOwnerDrawVariable. This event enables you to change the height of each individual item within the list box. The currently processed item is identified by its index via the AIndex parameter. The height in pixels must be assigned to the Height parameter. The AControl parameter represents the list box control whose item’s height is to be calculated.

Note

if the OnDrawItem event is not handled, items will have assigned heights but will be painted in the default manner.

See Also