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

TCustomListBox.CalculateStandardItemHeight

Determines the standard Height of the items, when the widget has yet been created.

Declaration

Source position: stdctrls.pp line 584

protected function TCustomListBox.CalculateStandardItemHeight: Integer; virtual;

Function result

Height for the items in the control.

Description

CalculateStandardItemHeight is an Integer function used to get the standard height for items in the control. CalculateStandardItemHeight is used in descendent classes, like TCustomCheckListBox, when its Style property is set to lbStandard and the Handle for the control (and its Canvas) has not been allocated.

CalculateStandardItemHeight gets the height for items using a temporary TBitmap instance. The Font for the control is assigned to the Canvas in the the bitmap instance, and its TextHeight method is called to get the return value.

CalculateStandardItemHeight is called from the FontChanged method in the TCustomCheckListBox descendent.

See also

TCustomCheckListBox.FontChanged

  

Recalculates the height for check box Items in the control when the Font is changed.


Version 4.0 Generated 2025-05-03 Home