Consultor Eletrônico



Kbase 16232: Migrating v6 to v7 Frame colors v6frame v6framebgc
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
Migrating v6 to v7 Frame colors v6frame v6framebgc

There are many ways to control the background
and foreground colors in frames. This notebook
entry deals specifically with changing colors
when migrating from v6 to v7 using V6FRAME on
MS-WINDOWS.

How to change colors for v6frame
--------------------------------
There are 3 ways to change the colors of your v6frames--
the progress.ini, MS-Windows settings and Progress 4gl.

PROGRESS.INI
------------
If you are using v6frame and you do not want to make any coding changes,
then you will only be able to control the BACKGROUND color
of your frames by creating the v6frameBGC option in the
[startup] section of your progress.ini. You can set v6frameBGC to
any color number that is defined in the progress.ini file and your
v6frames will take on that background color. THERE IS NO
PROGRESS.INI SETTING TO CHANGE FOREGROUND COLORS OF V6 FRAMES.
You can change your fill-in fields foreground and background colors
so that they are different from the frame by adding the USE-REVVIDEO
option to your V6FRAME option. The use of USE-REVVIDEO causes
Progress to use the INPUT color definitions in your progress.ini
for fill-in fields during input.

MS-Windows control panel
------------------------
Progress takes the MS-WIndows defaults for foreground and background
colors. If you want to change the foreground color too, then
you will have to change your MS-WINDOWS defaults. You can do this
through the CONTROL PANEL/Display/appearance dialog in WIN95 by
changing the ITEM combo-box in that dialog to 'window' and
specifying the foreground and background colors.


4GL
---
Changing the 4gl may be the least desirable option as you may be
porting a very large application and will have to add/change code
to many places.

If you are using v6frame as this notebook entry assumes, then
you are presumably porting version 6 code and are therefore
relying on default frames as opposed to ones that are
define via the DEFINE FRAME statement. In this case,
if you want to control your frames' foreground and background
color, then you can change your UPDATE or DISPLAY statements
to use the COLOR DISPLAY statement. It may look like this:

update x y z with color display normal .
or
display x y z with color display message.

These statements will set up your frame and your fill-ins
to use the foreground and background colors that
you have set up in your progress.ini as
NORMAL or MESSAGE. You can then use the USE-REVVIDEO
on the compile to further customize your fill-ins (not frames)
so that they use the INPUT color definition in your progress.ini
file. This will distinguish them from the frame colors that you
are using (defined by MESSAGE or NORMAL).

If you have already chosen to change the 4gl, you may want to
opt for using the newer constructs provided by version 7. This
may mean explicitly defining frames with the DEFINE FRAME
statement and setting the frame's BGCOLOR and FGCOLOR attributes
explicitly.


Progress Software Technical Support Note # 16232