TCustomSpeedButton.CalculatePreferredSize procedure
Calculates the default height and Width required for the control.
Declaration
procedure CalculatePreferredSize(var PreferredWidth: Integer;
var PreferredHeight: Integer;
WithThemeSpace: Boolean); overrideArguments
PreferredWidth | Preferred width for the control. |
PreferredHeight | Preferred height for the control. |
WithThemeSpace | Indicates if additional space is reserved in PreferredWidth and PreferredHeight for theme element details. |
Description
CalculatePreferredSize is an overridden method in TCustomSpeedButton. It calls MeasureDraw to gets the values for the variable parameters in PreferredWidth and PreferredHeight. If WithThemeSpace is enabled, additional spacing is reserved in PreferredWidth and PreferredHeight for theme element details; both arguments are increased by six (6) pixels.
CalculatePreferredSize is called from the GetPreferredSize method (in TControl) when control flags indicate the value has not already been determined.
Modified in LCL version 4.0 to include support the WithThemeSpace argument.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
