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

TCustomGrid.ScaleFontsPPI

Resizes fonts using a target PPI and a scaling factor.

Declaration

Source position: grids.pas line 1373

public procedure TCustomGrid.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

TCustomGrid.TitleFont

  

The font used for text in a column title.

TCustomGrid.Columns

  

Definitions for the columns displayed the grid.

TGridColumns

  

Collection used to store column definitions for a grid control.

TGridColumn

  

Implements a column definition used for tabular data in TCustomGrid.

TControl.Font

  

The font to be used for text display in this control.

TControl.ScaleFontsPPI

  

Resizes a font to the specified Pixels per Inch setting.


Version 4.0 Generated 2025-05-03 Home