[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'StdCtrls' (#lcl)

# TMeasureItemEvent

Specifies an event handler used to get the Height for a single item in an owner-drawn list box or combo-box.

## Declaration

Source position: stdctrls.pp line 284

`type TMeasureItemEvent = procedure(`
`Control: TWinControl;`
`Index: Integer;`
`var AHeight: Integer`
`) of object;`

## Arguments

`Control` |  | The list box or combo-box control.
`Index` |  | Index of the list item to measure.
`AHeight` |  | Height of the list item in pixels.

## Description

TMeasureItemEvent is an object procedure type which specifies an event handler signalled to get the height for a single item in an owner-drawn list box or combo-box control. Arguments passed to the handler include the control for the event notification, the index position for the item measured in the handler, and the derived height for the item.

TMeasureItemEvent is the type used for the OnMeasureItem property in TCustomComboBox and TCustomListBox. An application must implement and assign a procedure using the signature for the handler to respond to the event notification. The handler should account for variable height items when enabled in settings for the control.

## See also

TCustomComboBox.OnMeasureItem |  | Handler invoked when the height for an item is needed.
TCustomListBox.OnMeasureItem |  | Handler invoked when the height for an item is needed.