TCustomListBox.MeasureItem procedure
Gets the height for an item in the list.
Declaration
procedure MeasureItem(Index: Integer; var TheHeight: Integer); virtualArguments
Index | Ordinal position in Items for the string examined in the method. |
TheHeight | The height of the item in pixels, can be changed by the event handler. |
Description
MeasureItem is a procedure used to get the height for an item
displayed in the list box control.
Integer is the ordinal position in
Items for the value
measured in the method.
TheHeight is a variable parameter which contains the calculated
height for the text in the item. The value on entry is the text height for
the current font calculated using the
Canvas for the control. The
value returned in TheHeight is assigned to the
ItemHeight property
when it is a non-zero value.
MeasureItems signals the OnMeasureItem event handler (when
assigned) using the arguments passed to the method. An application must
implement an object procedure to calculate the height for the requested item
using the logic required.
MeasureItem is called when the LM_MeasureItem message is handled for the control.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
