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

# TCustomForm.SetAutoSize

Sets the value for the AutoSize property.

## Declaration

Source position: forms.pp line 671

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

## Arguments

`Value` |  | New value for the property.

## Description

SetAutoSize is an overridden method in TCustomForm used to set the value for the AutoSize property.

When set to True, it updates FormState to exclude the value fsDisableAutoSize, and modifies Position to use poDefault when it contains poDefaultPosOnly.

## See also

TScrollingWinControl.SetAutoSize |  | Sets the value for the AutoSize property.
TCustomForm.FormState |  | State flags for the form.
TCustomForm.Position |  | The initial placement for the form.
TControl.AutoSize |  | Allows automatic adjustment of the size for the control, according to its content.