Progress
Portability Guide


Colors

Progress understands colors according to a zero-based list of color numbers. Progress maps a color number to a particular color whose definition is stored in the environment files.

For applications on Windows (graphical or character), 16 predefined colors are available to use as foreground or background colors. In addition, you can add up to 256 colors in the registry or the progress.ini file. For best portability, do not change the first 16 predefined colors in graphical environments. To add a new color not in this default list, map the color to a number greater than 15.

In UNIX character interfaces, you can specify up to 123 color fields in a terminal entry that maps a color to an integer from 5 to 127. Set colors in your environment files so that the color numbers you use in your application are mapped to the same color on each platform.

Colors can be static or dynamic. You can use static colors to prevent users from modifying some colors while allowing them to modify others. You can modify dynamic colors in the 4GL using the SYSTEM-DIALOG COLOR statement or by explicitly setting the color’s red, green, and blue values using the COLOR-TABLE system handle. See the SYSTEM-DIALOG COLOR Statement reference entry in the Progress Language Reference.

Any entries that you add to the color table on Windows must be defined sequentially with no gaps. For example, since the registry or progress.ini file defines color0 through color15, the next color you add must be color16. If you mistakenly add an entry for color17, Progress ignores it if color16 is undefined. Therefore, for static colors to be portable between graphical interfaces, use only contiguous color numbers up to 255. For static colors to be portable across graphical and character interfaces, use contiguous color numbers up to 127.

When you specify a color for a widget in Progress, graphical interfaces consider only the FGCOLOR (foreground color) and BGCOLOR (background color). Character interfaces consider only DCOLOR (display color) and PFCOLOR (prompt color). Therefore, to make your application more portable between character and graphical interfaces, define all four types of color specifications. Each platform uses the two appropriate specifications and ignores the remaining two. See the Progress Language Reference for more information on using these options with the FORM statement.


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