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

TCustomForm.AutoScale

Sets scaled to True and calls AutoAdjustLayout with the current PPI for the monitor.

Declaration

Source position: forms.pp line 763

public procedure TCustomForm.AutoScale;

Description

AutoScale is a method used to apply an automatic layout adjustment policy to scale the form and its controls when enabled and needed.

AutoScale sets the value in the Scaled property to True if it is not already enabled. This causes AutoScale to be called again, so no additional actions are performed in the current method call.

AutoScale uses the value in the PixelsPerInch property for the Monitor where the form is displayed to determine if the form and its controls need to be scaled. When Scaled is enabled for the Application, and the run-time PixelsPerInch setting differs from the design-time value, the AutoAdjustLayout method is called. The lapAutoAdjustForDPI policy is applied in the method using scaling factors for the Width and Height values on the form and its Controls.

AutoScale is called when a new value is assigned to the Scaled property.


Version 3.2 Generated 2024-02-25 Home