TCustomImage.CalculatePreferredSize procedure
Gets the preferred width and height used as the default size for the control.
Declaration
procedure CalculatePreferredSize(var PreferredWidth: Integer;
var PreferredHeight: Integer;
WithThemeSpace: Boolean); overrideArguments
PreferredWidth | Preferred width for the control instance. |
PreferredHeight | Preferred height for the control instance. |
WithThemeSpace | Indicates if additional space is reserved for theme element details. Not used in TCustomImage. |
Description
CalculatePreferredSize is an overridden method in
TCustomImage. It calculates the preferred width and height for the
control, which is used by the LCL auto-sizing algorithms as the default size.
In TCustomImage, the values in the PreferredWidth and PreferredHeight
arguments are set to the Width and Height used in the
Picture
property. The WithThemeSpace argument is not used in the method.
CalculatePreferredSize does not call the inherited method.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
