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

TWinControl.ChangeScale

Scales (resizes) the control and all of its child controls.

Declaration

Source position: controls.pp line 2203

protected procedure TWinControl.ChangeScale(

  Multiplier: Integer;

  Divider: Integer

); override;

Arguments

Multiplier

  

Multiplier applied to a value to achieve a scaling factor.

Divider

  

Divisor applied to a value to achieve a scaling factor.

Description

ChangeScale is an overridden method in TWinControl used to ensure that child controls are scaled using the values in the Multiplier and Divider arguments.

ChangeScale extends the inherited method by calling DisableAlign before applying the scaling factor. It calls the ScaleControls method to apply Multiplier and Divider to the child controls. It calls the inherited method to apply scaling to the Bounds, Constraints, and Font in the control.

ChangeScale visits each of the control instances in Controls, and calls their UpdateAnchorRules method to update the BaseBounds in the control as needed.

EnableAlign is called prior to exiting from the method.

See also

TControl.ChangeScale

  

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


Version 3.2 Generated 2024-02-25 Home