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

PowerBuilder dot notation:

dw_control.Object.controlname.Font.property

Describe and Modify argument:

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

SyntaxFromSql:

	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 SyntaxFromSql, 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.

Values are:

  • 0 – ANSI

  • 1 – The default character set for the specified font

  • 2 – Symbol

  • 128 – Shift JIS

  • 255 – OEM

Painter: Font tab, CharSet option.

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.

Painter: Font tab, Escapement option.

Face

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

Painter: Font tab, FaceName option or StyleBar.

Family

(exp) An integer specifying the font family (Windows uses both face and family to determine which font to use).

Values are:

  • 0 – AnyFont

  • 1 – Roman

  • 2 – Swiss

  • 3 – Modern

  • 4 – Script

  • 5 – Decorative

Painter: Font tab, Family option.

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.

Painter: Font tab, Size option (specified in points) or StyleBar or Expressions tab.

Italic

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

Painter: Font tab, Italic check box or StyleBar.

Pitch

(exp) The pitch of the font.

Values are:

  • 0 – The default pitch for your system

  • 1 – Fixed

  • 2 – Variable

Painter: Font tab, Pitch option.

Strikethrough

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

Painter: Font tab, Strikeout check box.

Underline

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

Painter: Font tab, Underline check box or StyleBar.

Weight

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

Painter: Set indirectly using the Font tab, Bold option or the StyleBar, Bold button.

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:

Examples

Example 1

dw1.Object.emp_name_t.Font.Face

dw1.Object.emp_name_t.Font.Face = "Arial"

Example 2

dw1.Describe("emp_name_t.Font.Face")

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

See also

Transparency (columns and controls)