Progress
Programming
Handbook


Making Colors and Fonts Available to an Application

Progress applications typically access a subset of the system’s colors and fonts. This subset is specified in the following places:

These environment settings establish a one-to-one mapping between a range of integers and the system’s colors and fonts. These integers, in turn, correspond to entries in internal color and font tables. For example, on Windows, Progress, as installed, maps the color red to the integer 4. To assign red to a widget, an application assigns the value 4 to the appropriate widget attribute. Thus, the widget is assigned the fourth color from the internal color table.

For graphical interfaces, you can specify up to 256 colors and 256 fonts. However, it is also possible to define an arbitrary color, expanding beyond the 256 colors defined in the color table, using the RGB–VALUE function. The font for an ActiveX control is set through standard font properties and has no programmatic relationship to the font table. For information about using colors and fonts for ActiveX controls, see the chapter that discusses Active X controls in the Progress External Program Interfaces manual.

For character interfaces, you can specify up to 128 colors. When Progress starts up, it loads the color and font definitions from the specified environment into internal color and font tables. The numbers for both your color and font definitions must increase by 1, starting from 0. Progress stops loading its color or font table at the first skipped value.

For example, if colors 0, 1, 2, and 4 are defined, Progress loads only colors 0 through 2 because color 3 is missing. If colors 1, 2, and 3 are defined, Progress loads no colors because the definitions start after 0. The order of color and font definition does not matter; it is only important that a complete sequence of color and font numbers is defined.

For more information on specifying and editing environments for graphical and character interfaces, see the Progress Client Deployment Guide.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095