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

TCustomControl.FontChanged

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

Declaration

Source position: controls.pp line 2487

protected procedure TCustomControl.FontChanged(

  Sender: TObject

); override;

Arguments

Sender

  

Object instance (TControl) for the event notification.

Description

FontChanged is an overridden method in TCustomControl used to perform actions needed when the Font for the control has been changed. It is the routine used as the OnChange event handler for the Font property, and is assigned in the inherited constructor for the class instance.

Sender contains the object instance for the event notification, and is provided to maintain compatibility with the TNotifyEvent signature for the event handler. It is not used in TGraphicControl, but is passed as an argument to the inherited method.

FontChanged ensures that the new value for the Font property is also applied to the Canvas for the control. This includes the PixelsPerInch setting for the Font. FontChanged calls the inherited method prior to exit.

See also

TControl.FontChanged

  

Handles changes to the Font property.

TControl.Font

  

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

TControl.Create

  

Constructor for the class instance.

TFont.PixelsPerInch

  

Display density for the font.


Version 3.2 Generated 2024-02-25 Home