Sign in Join
FPDoc Onlineexperiment

TWinControl.ChangeScale procedure

Member of TWinControlprotectedIn unit Controls

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

Declaration

pascal
procedure 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

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.