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

TCustomGrid.TitleFont

The font used for text in a column title.

Declaration

Source position: grids.pas line 1294

protected property TCustomGrid.TitleFont : TFont
  read FTitleFont
  write SetTitleFont
  stored TitleFontIsStored;

Description

TitleFont is a TFont property with the font used for the text in a fixed column title. By default, TitleFont uses the same Font assigned to the grid control.

The OnTitleFontChanged event handler is used as the OnChange event handler for TitleFont, and ensures that updates to TitleFont are also applied to TGridColumn instances in the Columns collection (when enabled). In addition, the font in TitleFont is ignored when Columns has been Enabled; the Font assigned to the Title property for the TGridColumn instance is used instead.

GetColumnFont is called from PrepareCanvas to determine whether TitleFont or a font defined in the Columns collection is used to render the text in fixed cells.

Assigning a new value to TitleFont causes the VisualChange method to be called to recalculate column sizes in the grid control.

Font sizes (in both Font, TitleFont, and TGridColumn instances) may be scaled at run-time to provide support for high density displays. See ScaleFontsPPI for more information.


Version 3.2 Generated 2024-02-25 Home