<ControlName>.Font

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > UI (User Interface) > CONTROLS > Control Pseudo-object > Control Pseudo-object Methods, Properties, Events > Common Methods and Properties >

<ControlName>.Font

 

Description

 

Set the font to be used for a particular Windows Control

 

Syntax

 

<controlName>.Font(FontName [, Points, Style, Charset, Pitch])

 

Returns

 

Number.

 

Parameters

 

Name

Type

Optional

Meaning

FontName

String

No

Name of the font

Points

Number

No

Size of the font, in points

Style

Number

No

Font style attribute.

Any of the following values can be combined or used alone:

 

  0 Normal
  1 Bold
  2 Italic
  4 Underline
  8 Strikeout
 16 Leading

 

Some fonts specify "external leading" in their definition. In some cases, it only applies to certain point sizes of a font. External Leading specifies that one or more blank pixels are added to the bottom of each character when displayed. This has an impact on character position and should be considered when creating a font.

 

Normally, the font is created without regard to external leading. That is, it's created so that the visible character face fills the requested point size. However, if the Leading Option is used, the font will be created so that the visible character face plus the external leading (if any) fills the point size. In these cases, the character may appear slightly smaller.

Charset

Number


CharSet identifier.

 

  0 ANSI CharSet
  1 Default CharSet
  2 Symbol CharSet
 77 Mac CharSet
162 Turkish CharSet
177 Hebrew CharSet
178 Arabic CharSet
186 Baltic CharSet
128 Shiftjis CharSet
204 Russian CharSet
129 Hangeul CharSet
222 Thai CharSet
130 Johab CharSet
238 East Europe CharSet
136 Chinese CharSet
255 OEM CharSet
161 Greek CharSet

Pitch

Number


Pitch and Font Family attribute. One of each group of  values can be combined or used alone:

 

  0 Default
  1 Fixed width font
  2 Variable width font
 16 Roman font (Times Roman...)
 32 Swiss font (Helvetica, Swiss...)
 48 Modern font (Pica, Courier...)
 64 Script font (Cursive...)
 80 Decorative (OldEnglish...)

 

 

Remarks

 

Restrictions

 

See also

 

Examples

 

control add label  name MyLabel, hDlg, %lTitle"", 5, 5, 100, 25

 

' Set the font

MyLabel.Font "MS Sans Serif", 12