GetBaseFontDescriptor method (WinStudio scripts)

Applies To

IWSApplication interface

Definition

Returns a font descriptor string that indicates the base font used by the application user interface.

A "font descriptor" is a string consisting of a list of fourteen comma-separated values. For details on the font descriptor, see the "Remarks" section.

Syntax

Application.GetBaseFontDescriptor( )

Remarks

The return value is a string consisting of a list of fourteen comma-separated values that define the font, using the following format:

Size,0,0,0,Weight,Underline ,Italic,,Strikethrough,0,0,0,0,0,FontFamily

where:

 List item: Consists of:
Size A decimal value representing the point size.
Weight Range from 0 (non-bold) to 700 (bold).
Italic 0 = Normal text.

1 = Italicized text.

Underline 0 = Text not underlined.

1 = Text underlined.

Strikethrough 0 = Normal text.

1 = Text struck through.

FontFamily Name of the font (family) to be used.

Example

Sub Main()
   Dim FontDesc As String
   Dim newFont As Font  
   FontDesc = Application.GetBaseFontDescriptor()
   newFont = Application.FontFromFontDescriptor( FontDesc )
   If not IDONull.IsNull(newFont) Then 
        newFont = new Font( newFont, FontStyle.Bold )
        FontDesc = Application.FontDescriptorFromFont( Font.newFont )  
   End If   
   ThisForm.Components("FormCollectionGrid").SetGridRowColFont( 3, 4, FontDesc, True )
End Sub