TCustomComboBox See also
Occurs when an item in a csOwnerDrawVariable combo box needs to be redisplayed.
typedef void __fastcall (__closure *TMeasureItemEvent)(Controls::
TWinControl* Control, int Index, int &Height);
__property TMeasureItemEvent OnMeasureItem = {read=FOnMeasureItem, write=FOnMeasureItem};
Description
When Style is set to csOwnerDrawVariable, the OnMeasureItem event precedes OnDrawItem. Write an OnMeasureItem event handler to specify the height, in pixels, needed to draw an item in the drop-down list.
OnMeasureItem passes three parameters to its event handler:
Control A reference to the combo box containing the item.
Index The index of the item in the Items property.
Height The default height of the item, in pixels.
The event handler can reset the final parameter, Height, to the appropriate value.