how to display color in progress (chui) ?

Just4known

New Member
Dear friends,

i want to know how to display colors in progress whether in maintenance updation or in report output's.
i know only hilight the records with white color, what about other colors?

Thanks in advance.

regards
SKR.
 
You also need to use a terminal type that has colors. These are listed in the protermcap file (and can be modified... but save the current one first!).
 
Thanks for the reply,

i gone through the doc for color display, from there i know hilight the field records. The terminal showing only white and black colors, is it possible to get more colors like 3 fields in 3 different colors.

Regards:
SKR
 
As I said up there ^^^^, you need to have your terminal type set to one of the ones in the $DLC/protermcap file to use colors. The O/S and your telnet program needs to support the matching terminal type. e.g. If you telnet to a *nix system, the terminal type is the envirionment variable TERM. So if you currently use ansi, you could set your terminal type to ansic (one of the ones listed in the protermcap that have color) in your .profile or from a line command:

TERM=ansic ; export TERM

In your code then you can use for example (RED/WHT is one of the color combos within ansic in the protermcap):

Code:
color display value("RED/WHT") myfield with frame myframe.
There are other terminal types also listed with color, but as I mentioned both the O/S and your telnet program must be able to support the specific terminal type. You also should set the environment variable before you get into OE/Progress.

The various color combinations (foreground and background) allowed are listed in the protermcap file for you to use in the color display. Realize that bolding and other terrminal functions can affect the color display for better or worse.

NOTE: Just like the Windows registry editor, if you fully understand the file layout, what can and cannot be done, and are confident enough, the $DLC/protermcap can be modified (with a text editor) for other color combinations not listed or to change how the colors display (e.g. high intensity). It's not rocket science, but you could also totally screw up how your terminal behaves. Before you would edit it, I'd strongly suggest trying to use the term types and color combinations provided by the OE?Progress installation, because any changes you'd make would need to be redone if you upgrade to a later version.

If you choose to edit, save the original $DLC/protermcap before you do anything so you can always revert if you totally muck it up. I'd also suggest putting comments in if you do make changes. If you've made changes and this is a test/development environment (and it better be), once you have it working you will need to copy the $DLC/protermcap file onto your production environment(s) in their $DLC directories, replacing the ones provided by Progress AND all users would need to use the same terminal type(s) you were using/testing since OE/Progress's protermcap can use different numbers/names for the same color combo values.

It is possible, however, to have your code check for the terminal type in the program and display different color displays based on the terminal type.

For reports, you can either just send the appropriate escape sequence to the color printer within the code, create a pdf file using PDFInclude or something similar, or use one of the reporting packages that could interface with OE/Progress.
 
Back
Top