TFont.Pitch

Applies to TestComplete 15.45, last modified on December 01, 2022

Specifies whether the font characters have the same width.

Declaration

TFontObj.Pitch
Read-Only Property String
TFontObj     A TFont object  

Description

The TFont.Pitch property lets you obtain or set the pitch of the font that is used to display the text within a component.

A font can be a fixed-pitch or a variable-pitch. Characters in fixed-pitch fonts (for example, Courier) have the same width, whereas characters in variable-pitch fonts (for example, Arial) have different widths.

Return Value

One of the following string values:

Value Description
fpDefault The default pitch for the given font.
fpFixed The fixed pitch (all font characters have the same width).
fpVariable The variable pitch (font characters have different widths).

Remarks

If you set the Pitch property of a fixed-pitch font to fpVariable, or a variable-pitch font to fpFixed, the font used to display the text will be determined by the operating system's specified font attributes. This may cause a different font to be used in the component.

See Also

TFont.Name

Highlight search results