Sign in Join
FPDoc Onlineexperiment

TGridColumn.ScaleFontsPPI procedure

Member of TGridColumnpublicIn unit Grids

Scales the fonts for the column to a specified display density using a scaling factor.

Declaration

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

Arguments

AToPPI

Target pixels per inch for the fonts in the grid column.

AProportion

Scaling factor applied to pixels per inch when aToPPI is 0.

Description

ScaleFontsPPI is a method used to scale the height for fonts used to display the data and title in the grid column. It implements the method introduced in TControl, and applies the operation to the fonts used in the TGridColumn instance. It is called from the ScaleFontsPPI method in TCustomGrid when Columns have been defined for the grid control.

ScaleFontsPPI calls the DoScaleFontPPI method in Grid to adjust the control font using the arguments in AToPPI and AProportion.

AToPPI contains the pixels per inch value assigned to the fonts used when a non-zero value is specified. If AToPPI is omitted (0), the scaling factor in AProportion is used to scale the existing PixelsPerInch setting in the fonts by the factor in AProportion.

The ScaleFontsPPI method in Title is called to adjust the font used in the fixed title displayed for the column. It uses the same logic applied to the control Font.

ScaleFontsPPI is called when the AutoAdjustLayout method is used to apply a layout policy to a control.

See also

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