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

# TWinControl.AutoAdjustLayout

Automatically adjusts the size and layout for the control (and all of its children).

## Declaration

Source position: controls.pp line 2388

`public procedure TWinControl.AutoAdjustLayout(`
`AMode: TLayoutAdjustmentPolicy;`
`const AFromPPI: Integer;`
`const AToPPI: Integer;`
`const AOldFormWidth: Integer;`
`const ANewFormWidth: Integer`
`); override;`

## Arguments

`AMode` |  | Layout mode applied in the method.
`AFromPPI` |  | Existing pixels per inch (PPI) setting for the control.
`AToPPI` |  | Target pixels per inch (PPI) setting for the control.
`AOldFormWidth` |  | Form width before PPI scaling is applied.
`ANewFormWidth` |  | Form width after PPI scaling is applied.

## Description

AutoAdjustLayout is an overridden procedure used to automatically adjust the size and layout for the control. All children in the Controls property also call their AutoAdjustLayout method, and the inherited method is called to adjust and resize the current control instance.

AutoAdjustLayout calls DisableAutoSizing on entry, and EnableAutoSizing prior to exit from the method.

## See also

TControl.AutoAdjustLayout |  | Applies an automatic adjustment layout policy to the control.
TControl.DisableAutoSizing |  | Disables automatic sizing; implies that the default size is accepted, or sizing is done manually.
TControl.EnableAutoSizing |  | Enables automatic sizing for the control.
TControl.DoAutoAdjustLayout |  | Applies layout changes using the specified policy and scaling proportions to the control.
TWinControl.Controls |  | Provides indexed access to the child controls for the class instance.