Sign in Join
FPDoc Onlineexperiment

TControl.CMParentFontChanged procedure

Member of TControlprotectedIn unit Controls

Handles a CM_PARENTFONTCHANGED message for the control.

Declaration

pascal
procedure CMParentFontChanged(var Message: TLMessage); message

Description

CMParentFontChanged ensures that the Font from the Parent control is applied to the class instance when the message is received. It applies the PixelsPerInch setting in the Parent font (which is not included in object persistence) to the Font in the control.

No actions are performed in the method if ParentFont is set to False, or when the Parent property has not been assigned.

The current LCL version calls the ParentFontChanged method prior to exit. It has an empty implementation, and is maintained only for compatibility with older versions of the LCL. The work is actually performed in this method.

See also

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.