Sign in Join
FPDoc Onlineexperiment

TCustomEditButton.CalculatePreferredSize procedure

Member of TCustomEditButtonprotectedIn unit EditBtn

Calculates the preferred size for the control with optional space reserved by theme services.

Declaration

pascal
procedure CalculatePreferredSize(var PreferredWidth: Integer; 
 var PreferredHeight: Integer; 
 WithThemeSpace: Boolean); override

Description

CalculatePreferredSize is an overridden procedure used to calculate the dimensions for the control. The calculated values are returned in PreferredWidth and PreferredHeight.

CalculatePreferredSize calls the inherited method, and forwards the method call to the BaseEditor control. When AutoSizeHeightIsEditHeight is set to True, the value calculated as the control height in BaseEditor is used as the value in the PreferredHeight argument. The value in PreferredWidth is always set to zero (0).

This description is the one of GroupedEdit.TCustomAbstractGroupedEdit.CalculatePreferredSize.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.