[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Returns default/preferred height and width, for use in autosizing.
Source position: controls.pp line 1523
public procedure TControl.GetPreferredSize( |
var PreferredWidth: Integer; |
var PreferredHeight: Integer; |
Raw: Boolean = False; |
WithThemeSpace: Boolean = True |
); virtual; |
Raw |
|
If False then the values will be adjusted by the constraints, and undefined values will be replaced by GetDefaultWidth/GetDefaultHeight. |
WithThemeSpace |
|
If true, adds space for stacking. |
Called during AutoSize calculations. Only positive values are valid. Negative or 0 are treated as undefined and the LCL uses other sizes instead.
WithThemeSpace: If true, adds space for stacking.
For example: TRadioButton has a minimum size. But for stacking multiple TRadioButtons there should be some space around. This space is theme dependent, so the parameter is passed to the widgetset
TWinControl overrides this and asks the interface for theme dependent values. See TWinControl.CalculatePreferredSize for more information.
lazarus-ccr.sourceforge.net |