[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'ComCtrls' (#lcl)

TToolButton.GetPreferredSize

Returns default/preferred height and width, for use in auto-sizing.

Declaration

Source position: comctrls.pp line 2164

public procedure TToolButton.GetPreferredSize(

  var PreferredWidth: Integer;

  var PreferredHeight: Integer;

  Raw: Boolean = False;

  WithThemeSpace: Boolean = True

); override;

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

TControl.GetPreferredSize

  

Returns default/preferred height and width, for use in auto-sizing.