Unit 'Forms' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#lcl]

TCustomFrame.FixFrameFontsPPI

Adjusts the design-time PPI settings for fonts when scaling is enabled.

Declaration

Source position: forms.pp line 334

protected procedure TCustomFrame.FixFrameFontsPPI(

  PPI: Integer

);

Arguments

PPI

  

Pixels-per-Inch setting examined and adjusted in the method.

Description

FixFrameFontsPPI is a method used to adjust font PPI settings for the frame and its child controls. It ensures that font sizes are scaled (when enabled) so that the PixelsPerInch setting for the frame reflects the run-time PPI setting used in the Parent control. This occurs when the Loaded method is executed on completion of LCL component streaming, or when a new Parent has been assigned for the frame instance.

FixFrameFontsPPI temporarily disables alignment on the frame while the PPI settings are adjusted and cascaded to the child controls. It calls FixDesignFontsPPIWithChildren using the PPI value as an argument. This occurs when the Scaled property is enabled for both the Application and the frame instance. FixDesignFontsPPIWithChildren is not called if either of the Scaled properties is not enabled.

Version info

Added in LCL version 4.6.

See also

TCustomFrame.Loaded

  

Adjust the design-time PPI setting (when needed) when the frame instance has finished loading.

TCustomDesignControl.Scaled

  

Indicates if the design surface is scaled to reflect changes in display density (Pixels Per Inch).

TApplication.Scaled

  

Indicates if forms and controls in the application can be scaled to different display densities (Pixels per Inch).

GetParentForm

  

Gets the form instance for the specified Control.

TWinControl.FixDesignFontsPPIWithChildren

  

Fixes the design-time PPI settings for the control font, and applies the changes to child controls.

TWinControl.DisableAlign

  

Disables auto-sizing when aligning the control and its parent.

TWinControl.EnableAlign

  

Re-enables auto-sizing after aligning the control and its parent.

TControl.Parent

  

The control within which the control is shown.


Version 4.6 Generated 2026-02-20 Home