Sign in Join
FPDoc Onlineexperiment

TWinControl.ScaleControls procedure

Member of TWinControlprotectedIn unit Controls

Scales values for all child controls.

Declaration

pascal
procedure ScaleControls(Multiplier: Integer; Divider: Integer); virtual

Arguments

Multiplier

Multiplier applied to a value to achieve a scaling factor.

Divider

Divisor applied to a value to achieve a scaling factor.

Description

ScaleControls is a method used to scale the child controls in the Controls property using the specified multiplier and divisor. ScaleControls visits each of the class instances in Controls and calls its ChangeScale method using Multiplier and Divider as arguments.

ScaleControls is called from the overridden ChangeScale method. This causes all controls in the hierarchy to apply the scaling factor to values in their Constraints, Font, Left, Top, Right and Bottom properties. For top-level Forms, the values in Left and Top are not scaled.

See also

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