[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Calculates the clipping width and height for a top-level form on the monitor WorkArea.
Source position: forms.pp line 663
protected procedure TCustomForm.CalculatePreferredSize( |
var PreferredWidth: Integer; |
var PreferredHeight: Integer; |
WithThemeSpace: Boolean |
); override; |
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. |
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.
|
Contains the Monitor where the form is shown. |
|
|
The usable display area on the monitor excluding the system task bar. |
|
|
Override this method to return the preferred height and width for the control. |
|
|
The set of anchor definitions for this control. |
Version 3.2 | Generated 2024-02-25 | Home |