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

# TToolButton.SetAutoSize

Sets the value the AutoSize property and adjusts the control size when needed.

## Declaration

Source position: comctrls.pp line 2179

`protected procedure TToolButton.SetAutoSize(`
`Value: Boolean`
`); override;`

## Arguments

`Value` |  | New value for the AutoSize property.

## Description

SetAutoSize is an overridden method in TToolButton used to set the value for the AutoSize property. It calls the inherited method to apply the new value for the property. It calls RequestAlign to adjust the size and alignment for the button control (and its siblings) on the Parent control.

## See also

TToolButton.AutoSize |  | Allows the control to grow to the size for its content.
TControl.SetAutoSize |  | Sets the value for the AutoSize property.
TControl.RequestAlign |  | Asks the parent control to realign all controls that are siblings.
TControl.Parent |  | The control within which the control is shown.