Progress
Language Reference
FONT-TABLE System Handle
A handle to the current font table.
SYNTAX
attribute
Specifies an attribute of the FONT-TABLE handle. The attributes are shown in this table.
method
Specifies a method of the FONT-TABLE handle. The methods are shown in this table.
Method Return Type Description GET-TEXT-HEIGHT-CHARS( ) Method ( [ font ] ) DECIMAL Returns the character unit height of the font. If you omit font, the height of the default font is returned. GET-TEXT-HEIGHT-PIXELS( ) Method ([ font ] ) INTEGER Returns the pixel height of the font. If you omit font, the height of the default font is returned. GET-TEXT-WIDTH-CHARS( ) Method ( string [ , font ] ) DECIMAL Returns the character unit width of the string in the font. If you omit font, the width in the default font is returned. GET-TEXT-WIDTH-PIXELS( ) Method (string [ , font] ) INTEGER Returns the pixel width of the string in the font. If you omit font, the width in the default font is returned.EXAMPLE
This code shows how to query and set the integer attribute, NUM-ENTRIES.
NOTES
- Unlike the COLOR-TABLE system handle, the FONT-TABLE system handle does not allow you to set fonts dynamically. Font entries can only be changed by the user through the font system dialog box. Fonts are always dynamic.
- The current font table is the font table in the current environment, which is the startup environment or the environment most recently specified in a USE Statement.
- To determine the number of font entries in the font table, query the NUM-ENTRIES attribute.
- To change the number of font entries in the font table, set the NUM-ENTRIES attribute.
- To allow users to set dynamic font table entries at run time, an application can display a font common dialog with the SYSTEM-DIALOG FONT statement.
- To save font definitions from the font table to the current environment file, use the PUT-KEY-VALUE Statement. To retrieve the font definition specified in the current environment file, use the GET-KEY-VALUE statement.
- The TYPE attribute returns the widget type, PSEUDO-WIDGET.
SEE ALSO
GET-KEY-VALUE Statement, PUT-KEY-VALUE Statement, SYSTEM-DIALOG FONT Statement, USE Statement
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |