Sign in Join
FPDoc Onlineexperiment

TCustomAbstractGroupedEdit.CalculatePreferredSize procedure

Member of TCustomAbstractGroupedEditprotectedIn unit GroupedEdit

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

Arguments

PreferredWidth

Width for the control; always zero in the method.

PreferredHeight

Height for the control.

WithThemeSpace

Indicates if additional space needed for theme services is reserved.

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).

See also

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