IImageButtonLook.Font

Syntax

Font: IControlFont;

Description

The Font property determines parameters of the font that is used to display text when the component state is determined.

Comments

In object inspector this property is displayed as a composite property. Any of its subproperties should be changed to change the value of this property.

NOTE. Change of particular components of the Font property determined for the component leads to changing the corresponding font components for all states of the button. If the font should have some specific settings in some states, they should be set after changing the Font property of the component:

Var
    ButtonFont: IControlFont;
    PressLook: IImageButtonLook;
Begin
    //General parameters of the font for all button states
    ButtonFont := ImageButton1.Font;
    ButtonFont.Name := "Arial";
    ButtonFont.Underline := True;
    ButtonFont.Color := GxColor.FromName("Red");
    //Individual parameters of the font for pressed state
    PressLook := ImageButton1.PressedLook;
    ButtonFont := PressLook.Font;
    ButtonFont.Color := GxColor.FromName("Crimson");

See also:

IImageButtonLook