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

# TControl.ChangeScale

Applies scaling (multiplier and divider) to the bounds coordinates, constraints, and Font in a control.

## Declaration

Source position: controls.pp line 1389

`protected procedure TControl.ChangeScale(`
`Multiplier: Integer;`
`Divider: Integer`
`); virtual;`

## Arguments

`Multiplier` |  | Multiplicand used to calculate the scaled numeric values.
`Divider` |  | Divisor used to calculate the scaled numeric values.

## Description

ChangeScale is a method used to apply scaling, expressed by the Multiplier and Divider arguments, to size values in the control. These values include:

- The minimum and maximum heights and widths in Constraints (by calling ScaleContraints).
- The Font height (when ParentFont is not enabled).
- The bounds rectangle for the control (Left, Top, Bottom, and Right). If the control is the top-most form in a component hierarchy, the Top and Left values are not changed.

ChangeScale calls the MulDiv routine in the LCLType unit to calculate the scaled numeric values. The results from the calculations are rounded and returned as an Integer type.

No actions are performed in the method when Multiplier and Divider have the same value.

ChangeScale can be overridden in descendent classes to perform any additional action needed for the class type.

ChangeScale is called from the ScaleControls and ScaleBy methods in the TWinControl descendant.

## See also

TControl.BaseBounds |  | The rectangle with the designed bounds for the control.
TControl.BoundsRect |  | The Top, Left and Bottom, Right for the control, in client coordinates.
TControl.Font |  | The font to be used for text display in this control.
TControl.ParentFont |  | Indicates if the Font from the Parent control is used in the control.
TControl.ScaleConstraints |  | Scales the minimum and maximum Width and Height.
TWinControl.ScaleBy |  | Scales (resizes) the control and all of its child controls.
TWinControl.ScaleControls |  | Scales values for all child controls.
MulDiv |  | Multiples the numerator by the specified Integer value, and divides the result by the denominator value.