TCustomComboBox.MeasureItem procedure
Gets the height for an item in the drop-down list.
Declaration
procedure MeasureItem(Index: Integer; var TheHeight: Integer); virtualArguments
Index | The index of the item whose height is required. |
TheHeight | The height of the item, in pixels, calculated in the OnMeasureItem handler. |
Description
MeasureItem is a procedure used to get the height for an item in
the drop-down list for the control.
MeasureItem is called when the LM_MeasureItem message is handled for
the control. The value in ItemHeight has already been updated in
the message handler, and is used for a list box Style that has a
fixed item height. MeasureItem is called from the message handler when the
Style uses a variable item height. The derived item height is stored in the
ItemHeight property when it is a non-zero positive value.
MeasureItem signals the OnMeasureItem event handler (when
assigned) to calculate the height for the specified item. The value in the
Index argument determines the string value in Items
used for the calculation. TheHeight is updated with the derived
height for the list box item. An application must implement the OnMeasureItem
event handler to calculate the height for variable height items in the
control.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
