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

# TColorButton.DoAutoAdjustLayout

Applies auto-layout changes using the specified policy and scaling proportions to the control.

## Declaration

Source position: dialogs.pp line 361

`protected procedure TColorButton.DoAutoAdjustLayout(`
`const AMode: TLayoutAdjustmentPolicy;`
`const AXProportion: Double;`
`const AYProportion: Double`
`); override;`

## Arguments

`AMode` |  | Identifies the auto-layout policy applied in the method.
`AXProportion` |  | Scaling factor for horizontal dimensions.
`AYProportion` |  | Scaling factor for vertical dimensions.

## Description

DoAutoAdjustLayout is an overridden method in TColorButton used to implement changes to control and border sizes for the AutoAdjustLayout method. These methods are called when High-DPI and scaling have been enabled in the project options for an application.

AMode indicates the automatic layout policy applied in the method. It is a value from the TLayoutAdjustmentPolicy enumeration, and determines whether horizontal / vertical / or both sizes are adjusted in the method. It generally reflects the constraints for the device type where the application is running.

AXProportion and AYProportion contain the scaling factors applied to the horizontal and/or vertical sizes.

DoAutoAdjustLayout calls the inherited method on entry. It extends the method to update the ButtonColorSize and BorderWidth properties when AMode indicates that either horizontal or high DPI scaling are used.

## Version info

Added in LCL version 3.0.

## See also

TControl.DoAutoAdjustLayout |  | Applies layout changes using the specified policy and scaling proportions to the control.