[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Adjusts fonts in the control to the specified design-time PixelsPerInch.
Source position: grids.pas line 1354
public procedure TCustomGrid.FixDesignFontsPPI( |
const ADesignTimePPI: Integer |
); override; |
FixDesignFontsPPI is an overridden procedure used to adjust the assigned font size for grid columns and their titles to the specified design-time Pixels Per Inch (PPI). This is needed because the display density (PPI) used for fonts is not stored in Form resource (.LFM) files. When the design-time PPI is different than the run-time setting, font scaling issues can occur.
FixDesignFontsPPI restores the design-time font PPI so it can be used in the LCL Scaling mechanism. FixDesignFontsPPI calls the inherited method on entry, and sets the value for the PixelsPerInch property in TitleFont when needed. Column definitions stored in the Columns property are also adjusted (when needed) by calling the FixDesignFontsPPI method for each of the TGridColumn instances in the container.
FixDesignFontsPPI is called when scaling is enabled, and the Form which hosts the control calls its Loaded method during LCL streaming.
|
Resizes fonts using a target PPI and a scaling factor. |
|
|
Definitions for the columns displayed the grid. |
|
|
Collection used to store column definitions for a grid control. |
|
|
Corrects the design-time PPI for the column title. |
|
Version 4.0 | Generated 2025-05-03 | Home |