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

# TCustomColorListBox.DoAutoAdjustLayout

Performs actions needed to auto-adjust the control using the specified layout policy.

## Declaration

Source position: colorbox.pas line 199

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

## Arguments

`AMode` |  | Layout adjustment policy applied in the method.
`AXProportion` |  | Horizontal scaling factor for the policy.
`AYProportion` |  | Vertical scaling factor for the policy.

## Description

DoAutoAdjustLayout is an overridden method used to apply the specified auto-adjust layout policy to the control. DoAutoAdjustLayout calls the inherited method on entry.

DoAutoAdjustLayout ensures that the value in ColorRectWidth is adjusted by the scaling factor in AXProportion when AMode contains lapAutoAdjustWithoutHorizontalScrolling or lapAutoAdjustForDPI. The control is redrawn after ColorRectWidth is updated.

DoAutoAdjustLayout is called from the AutoAdjustLayout method.

## See also

TCustomListBox.DoAutoAdjustLayout |  | Performs actions needed to auto-adjust the control using the specified layout policy.
TControl.DoAutoAdjustLayout |  | Applies layout changes using the specified policy and scaling proportions to the control.