Type | Description | |||
IFontDisp | A font object that indicates the control's font. |
Specifies the control's font. Use the LineNumberFont property to specify the font for the control's line numbers bar. 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 HTML1 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_html.GetFont(); font.SetName( "Tahoma" ); m_html.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 AxHTML1 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); axHTML1.Font = font; axHTML1.CtlRefresh();
The following VFP sample assigns by code a new font to the control:
with thisform.HTML1.Object .Font.Name = "Tahoma" .Refresh() endwith
The following Template sample assigns by code a new font to the control:
Font { Name = "Tahoma" }