TCustomCheckListBox.CalculateStandardItemHeight function
Calculates the height for an item displayed on the check list control.
Declaration
function CalculateStandardItemHeight: Integer; overrideFunction result
Height in pixels for a check box item on the control.
Description
CalculateStandardItemHeight is an overridden method used to
calculate the height for an item on the check list control.
CalculateStandardItemHeight calls the inherited method on entry to get the height for an item using the Canvas and Font in the class instance. The value is adjusted when needed to the size needed for the SM_CYMENUCHECK system metric. 2 pixels are added to the value as padding, and it is stored in the return value for the method.
CalculateStandardItemHeight is called from the FontChanged method, and occurs when the Font size is changed for the control. It is also called when the LM_MeasureItem is handled in the ancestor class (TCustomListBox).
CalculateStandardItemHeight is used when Style is set to a value other than
lbOwnerDrawVariable. Use the OnMeasureItem event handler to
calculate the item height when Style is set to lbOwnerDrawVariable.
Added in LCL version 3.0 as a replacement for the MeasureItem method.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
