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

TControl.FontChanged

Handles changes to the Font property.

Declaration

Source position: controls.pp line 1517

protected procedure TControl.FontChanged(

  Sender: TObject

); virtual;

Arguments

Sender

  

Class instance generating the change notification.

Description

FontChanged is a procedure used to perform actions needed when the value in the Font property has been changed for the control. FontChanged ensures that values in ParentFont and DesktopFont are set to False to reflect the font assignment.

FontChanged calls the Invalidate method to force the control to be redrawn when it is Visible. The CM_FONTCHANGED control change message is performed to reflect the change in the control state. When AutoSize contains True, the InvalidatePreferredSize and AdjustSize methods are called to update the control dimensions using the new font.

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

See also

TControl.Font

  

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

TControl.ParentFont

  

Indicates if the Font from the Parent control is used in the control.

TControl.DesktopFont

  

Indicates if the desktop (system) font is used for the text displayed on this control.

TControl.Invalidate

  

Causes a delayed Repaint of the control by marking its visible area of the control as invalid.

TControl.InvalidatePreferredSize

  

Marks the preferred size as invalid for this control and all parents (implies that we will look for another).

TControl.AdjustSize

  

Smart way to DoAutoSize.

TControl.IsVisible

  

Gets the effective visibility for the control and all of its Parent controls.

TControl.AutoSize

  

Allows automatic adjustment of the size for the control, according to its content.

TControl.Perform

  

Calls a message handler directly, bypassing the message queue.


Version 3.2 Generated 2024-02-25 Home