Sign in Join
FPDoc Onlineexperiment

TCustomGrid.ScaleFontsPPI procedure

Member of TCustomGridpublicIn unit Grids

Resizes fonts using a target PPI and a scaling factor.

Declaration

pascal
procedure ScaleFontsPPI(const AToPPI: Integer; 
 const AProportion: Double); override

Arguments

AToPPI

New PPI setting for the scaled font sizes.

AProportion

Scaling factor applied to the font sizes.

Description

ScaleFontsPPI is an overridden procedure used to resize fonts in the control to the specified display density (Pixels per Inch) using the scaling factor in AProportion. This occurs when the run-time PPI setting for a font differs from the design-time value stored in the component resource.

ScaleFontsPPI is overridden to apply the scaling factor to the Font and TitleFont for the control, and any fonts assignments in the Columns collection. The inherited DoScaleFontsPPI method is called to apply the scaling factor to the TFont instance passed as an argument.

See also

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