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

TCustomCheckListBox.MeasureItem

Calculates the height for an item displayed in the check list control.

Declaration

Source position: checklst.pas line 71

public procedure TCustomCheckListBox.MeasureItem(

  Index: Integer;

  var TheHeight: Integer

); override;

Arguments

Index

  

Ordinal position for the check box item measured in the method.

TheHeight

  

Returns the calculated height for the check box item.

Description

MeasureItem is an overridden method used to calculate the height for an item displayed in the check list control.

MeasureItem re-implements the method from the ancestor class, and calculates the item height when the Style property is set to lbStandard. The values from CalculateStandardItemHeight and GetSystemMetrics (using SM_CYMENUCHECK) are compared to get the item height. The larger of the two values is stored in the TheHeight argument.

When Style is set to a value other than lbStandard, the inherited method is called to calculate the item height using the OnMeasureItem event handler.

See also

TCustomListBox.CalculateStandardItemHeight

  

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

TCustomListBox.MeasureItem

  

Gets the height for an item in the list.

TCustomListBox.OnMeasureItem

  

Handler invoked when the height for an item is needed.

TCustomListBox.Style

  

Appearance of the list box (normal, owner-draw fixed, or owner-draw variable).

GetSystemMetrics

  

Retrieves various system metrics.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.