Font Property

Returns or sets the current font used when drawing text.

Syntax

Object.Font [ = pFont ]

The Font property syntax has the following parts:

 

Name

Type

Description

Object

A control or the AForm

A control object or the AForm object.

pFont

AFont

The current font used when drawing text.

Comments

See the AFont class for the properties. This property can be set at design time. At run time, the property provides access to the font properties, for example, bold, Arial style, etc. The font attributes come from the fonts installed in Windows, so the font size must be supported by the weight for that font, etc.

The property is not applicable for MDI forms.

Example

The following statement changes the ACheckBox face name Font:

chk1.Font.Name="Arial"

Applies to

 

AButton

AComboBox

AGroupBox

AListBox

ATextBox

ACheckBox

AForm

ALabel

ARadioButton

 

See Also

AFont, Font3D, FontTransparent