[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Returns default/preferred height and width, to be used in autosizing algorithms
Source position: controls.pp line 1286
public procedure TControl.GetPreferredSize( |
var PreferredWidth: Integer; |
var PreferredHeight: Integer; |
Raw: Boolean = false; |
WithThemeSpace: Boolean = true |
); virtual; |
GetPreferredSize - find default/preferred height and width
procedure TControl.GetPreferredSize (var PreferredWidth, PreferredHeight: integer; WithThemeSpace: Boolean);
Returns the default/preferred width and height for a control, which are used by the LCL autosizing algorithms as default size. 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 passes to the widgetset
TWinControl overrides this and asks the interface for theme dependent values. See TWinControl.CalculatePreferredSize for more information.
lazarus-ccr.sourceforge.net |