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

TCustomGrid.FontChanged

Performs actions needed when the font for the control is changed.

Declaration

Source position: grids.pas line 1085

protected procedure TCustomGrid.FontChanged(

  Sender: TObject

); override;

Arguments

Sender

  

Object for the event notification.

Description

FontChanged is an overridden method used to perform actions needed when the Font for the control has been changed.

FontChanged ensures that the internal default heights for rows and columns are reset to 0 (zero). This causes the default column and row heights to be recalculated when the DoAutoAdjustLayout method is called.

When csCustomPaint is included in ControlState, the Font is assigned to the Canvas for the control.

Otherwise, the FontChanged method is called for the ancestor class and the Columns collection (when Enabled). If the default title font is used for the control, the Font is assigned to TitleFont property.

FontChanged is assigned as the OnChange event handler for the Font property in the constructor for the class instance.

See also

TCustomGrid.Columns

  

Definitions for the columns displayed the grid.

TCustomGrid.TitleFont

  

The font used for text in a column title.

TGridColumn.Title

  

Contains the attributes for the title in the fixed header for the column.

TGridColumnTitle.Font

  

Contains the typeface and text attributes for the Caption displayed in the column title.

TControl.Font

  

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

TControl.ControlState

  

Contains state flags which indicate whether the control has been clicked, data is being read, or the control is being re-drawn, etc.

TCustomControl.FontChanged

  

Performs actions needed when the Font for the control has been changed.

TFont

  

Represents a font used to draw text in an application.


Version 4.0 Generated 2025-05-03 Home