Kbase P96178: How to manage colors with the Progress.ini file?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  17/11/2004 |
|
Status: Unverified
GOAL:
How to manage colors with the Progress.ini file
FIX:
The colors section within the Progress.ini file should be propagated to each client if the colors have been customized within the application at development. This section options that specify the colors that make up the color table for the gui clients. There are 16 colors available to an application for use as either foreground or background colors. However, you can specify up to 256 colors. Please note that you should not change the first 16 colors. These colors are reserved for the Application Development Environment (ADE) tools. Changing them could cause the Progress ADE tools to malfunction.
Each entry in the Colors section performs two semantic functions: it defines a color, and it maps that color to an integer in the range 0 to 255. An application specifies this integer when making a color assignment to a widget. To specify a color, use the following syntax:
colorn = { R , G , B , | colorname }
Syntax key:
n - An integer from 0 to 255 that specifies the color table entry.
R - An integer that specifies the amount of red present in the color.
G - An integer that specifies the amount of green present in the color.
B - An integer that specifies the amount of blue present in the color.
colorname - Any of the following color names, mapped to the colors defined in the Windows Control Panel:
COLOR-SCROLLBAR
COLOR-BACKGROUND
COLOR-ACTIVECAPTION
COLOR-INACTIVECAPTION
COLOR-INACTIVECAPTIONTEXT
COLOR-MENU
COLOR-WINDOW
COLOR-WINDOWFRAME
COLOR-MENUTEXT
COLOR-WINDOWTEXT
COLOR-CAPTIONTEXT
COLOR-ACTIVEBORDER
COLOR-INACTIVEBORDER
COLOR-APPWORKSPACE
COLOR-HIGHLIGHT
COLOR-HIGHLIGHTTEXT
COLOR-BTNFACE
COLOR-BTNHIGHLIGHT
COLOR-BTNSHADOW
COLOR-GRAYTEXT
COLOR-BTNTEXT
The following guidelines should be considered when making changes to the color table:
1. Any entries you add to the color table must be sequential. For example, since the installed progress.ini file defines color0 to color15, the next color you add must be color16. If you add an entry for color17, Progress ignores it if color16 is undefined.
2. For backward compatibility
2a. Color0 to color15, as installed, are the same as the colors supported in Version 6. See the chapter about colors and fonts in the Progress Programming Handbook for a listing of these colors.
2b. The progress.ini file specifies the following color pairs for Version 6 applications:
· NORMAL specifies the colors for fill-ins that do not have input focus.
· INPUT specifies the colors for fill-ins that have input focus.
· MESSAGES specifies the colors for the message area.
NORMAL, INPUT, and MESSAGES each take a pair of integer values from 0 to 255. The integers represent color table entries. For example, in the default progress.ini file, NORMAL is defined as foreground equal to color table entry 0 (RGB value 0,0,0) and background equal to color table entry 15 (RGB value 255,255,255).
The following example shows how to redefine NORMAL as foreground equal to color table entry 3 and background equal to color table entry 12:
NORMAL=3,12