TToolButton.GetPreferredSize procedure
Returns default/preferred height and width, for use in auto-sizing.
Declaration
procedure GetPreferredSize(var PreferredWidth: Integer;
var PreferredHeight: Integer;
Raw: Boolean=False;
WithThemeSpace: Boolean=True); overrideArguments
PreferredWidth | Preferred width for the control used in auto-sizing algorithms. |
PreferredHeight | Preferred height for the control used in auto-sizing algorithms. |
Raw | True if the calculated values are used as is. False if the value can be adjusted by constraints or set to default values. |
WithThemeSpace | True to reserve space for stacking and alignment provided in theme element details. |
Description
Called during AutoSize calculations. Only positive values are valid. Negative or 0 are treated as undefined, and the LCL uses other sizes instead.
When WithThemeSpace is True, additional space is reserved for stacking.
Calls the inherited method on entry. Values from the ButtonWidth and ButtonHeight properties in the parent tool bar may be used in the PreferredWidth and PreferredHeight arguments, depending on the orientation for the tool bar. No additional actions are performed in the method if the parent tool bar has not been assigned.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
