property Expression.Font as IFontDisp
Retrieves or sets the control's font.

TypeDescription
IFontDisp A font object that indicates the control's font.

Specifies the control's font. Use the Refresh method to update the control's content. Use the Font property to assign a font to the control in design mode. The Font property adjusts the height of the line too.

The following template changes the font and refresh the control on ObjectStudio (Smalltalk):

Font
{
	Name = "Courier New"
	Size = 10
}
Refresh

The Refresh method refreshes the height of the line, as the Size of the Font property won't change it. 

The following VB sample assigns by code a new font to the control:

With Expression1
    With .Font
        .Name = "Tahoma"
    End With
    .Refresh
End With

The following C++ sample assigns by code a new font to the control:

COleFont font = m_expression.GetFont();
font.SetName( "Tahoma" );
m_expression.Refresh();

the C++ sample requires definition of COleFont class ( #include "Font.h" )

The following VB.NET sample assigns by code a new font to the control:

With AxExpression1
    Dim font As System.Drawing.Font = New System.Drawing.Font("Tahoma", 10, FontStyle.Regular, GraphicsUnit.Point)
    .Font = font
    .CtlRefresh()
End With

The following C# sample assigns by code a new font to the control:

System.Drawing.Font font = new System.Drawing.Font("Tahoma", 10, FontStyle.Regular);
axExpression1.Font = font;
axExpression1.CtlRefresh();

The following VFP sample assigns by code a new font to the control:

with thisform.Expression1.Object
	.Font.Name = "Tahoma"
	.Refresh()
endwith

The following Template sample assigns by code a new font to the control:

Font
{
	Name = "Tahoma"
}