TCustomForm.CalculatePreferredSize procedure
Calculates the clipping width and height for a top-level form on the monitor WorkArea.
Declaration
procedure CalculatePreferredSize(var PreferredWidth: Integer;
var PreferredHeight: Integer;
WithThemeSpace: Boolean); overrideArguments
PreferredWidth | Default width for a new instance of the class. |
PreferredHeight | Default height for a new instance of the class. |
WithThemeSpace | True if additional space is reserved for theme element details. |
Description
CalculatePreferredSize is an overridden method in
TCustomForm. It calls the inherited method on entry to calculate
the default dimensions for the new class instance, and to notify the
widgetset class when its Handle has been allocated.
CalculatePreferredSize ensures that a form anchored to the bottom or right fits within the WorkArea rectangle on the Monitor. The value in PreferredWidth or PreferredHeight is updated when Anchors contains akRight or akBottom.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
