Sign in Join
FPDoc Onlineexperiment

TGraphicControl.FontChanged procedure

Member of TGraphicControlprotectedIn unit Controls

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

Declaration

pascal
procedure FontChanged(Sender: TObject); override

Arguments

Sender

Object instance for the event notification.

Description

FontChanged is an overridden method in TGraphicControl 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

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