Font.property

Description

Settings that control the appearance of fonts within a DataWindow, except for graphs, which have their own settings (see DispAttr).

Applies to

Button, Column, Computed Field, GroupBox, and Text controls

Syntax

Describe and Modify argument:

"controlname.Font.property { = ' value ' }"

DataWindowSyntaxFromSql:

	Column(Font.property = value)
	Text(Font.property = value)

Parameter

Description

controlname

The name of a column, computed field, or text control for which you want to get or set font properties. For a column, you can specify the column name or a pound sign (#) followed by the column number.

When you generate DataWindow syntax with DataWindowSyntaxFromSql, the Font settings apply to all columns or all text controls.

property

A property of the text. The properties and their values are listed in the table below.

value

The value to be assigned to the property. Value can be a quoted DataWindow expression.

Property for Font

Value

CharSet

(exp) An integer specifying the character set to be used. (Not supported in DataWindow Designer.)

Values are:

  • 0 – ANSI

  • 1 – The default character set for the specified font

  • 2 – Symbol

  • 128 – Shift JIS

  • 255 – OEM

Escapement

(exp) An integer specifying the rotation for the baseline of the text in tenths of a degree. For example, a value of 450 rotates the text 45 degrees. 0 is horizontal.

Face

(exp) A string specifying the name of the font face, such as Arial or Courier.

Family

(exp) An integer specifying the font family (Windows uses both face and family to determine which font to use). (Not supported in DataWindow Designer.)

Values are:

  • 0 – AnyFont

  • 1 – Roman

  • 2 – Swiss

  • 3 – Modern

  • 4 – Script

  • 5 – Decorative

Height

(exp) An integer specifying the height of the text in the unit measure for the DataWindow. To specify size in points, specify a negative number.

Italic

(exp) Whether the text should be italic. The default is no.

Pitch

(exp) The pitch of the font. (Not supported in DataWindow Designer.)

Values are:

  • 0 – The default pitch for your system

  • 1 – Fixed

  • 2 – Variable

Strikethrough

(exp) Whether the text should be crossed out. The default is no.

Underline

(exp) Whether the text should be underlined. The default is no.

Weight

(exp) An integer specifying the weight of the text; for example, 400 for normal or 700 for bold.

Painter: Set indirectly using the Bold option.

Width

(exp) An integer specifying the average character width of the font in the unit of measure specified for the DataWindow. Width is usually unspecified, which results in a default width based on the other properties.

Painter: Set indirectly using the font selection.

Usage


In the painter

Select the control and set the value using the Properties window, Font category:

Examples

Example 1

[Visual Basic]
dw1.Describe("emp_name_t.Font.Face")

dw1.Modify("emp_name_t.Font.Face='Arial'")