Sign in Join
FPDoc Onlineexperiment

TMeasureItemEvent procedure type

In unit StdCtrls

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

Declaration

pascal
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

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.