2

store additional color schemes that
you can swap with the active schemes.
For example:
Swap inactive color scheme for
active one.
SET COLOR OF SCHEME 2 TO
SCHEME 15 && change scheme 2
<commands that use scheme 2>
SET COLOR OF SCHEME 2 TO
&& restore old scheme 2
You can also use COLOR OF
SCHEME = to set color schemes in
Config.fp. Use SCHEME() to get a
scheme’s color pair list.
Color Set
There are 24 color schemes in a
color “set.” Color sets are named and
saved in the FOXUSER.DBF resource
file. When FoxPro starts up, it loads
the color set named DEFAULT unless
another set name is chosen during
install or specified with COLOR SET
= <set name> in Config.fp. You
can also load a new color set with the
SET COLOR SET command after Fox-
Pro is running.
Color sets also save and restore
the setting of SET BLINK, which can
double the number of colors avail-
able on BOA and VGA systems.
Usage
The easiest and most portable way
to use the FoxPro color system is to
select colors visually and interactive-
ly from the Color dialog which is
available from the System menu Win-
dow pulidown. Once you have
chosen appropriate color settings for
all your application’s objects, save
them to a named color set and put
COLOR SET = in your Config.fp file.
You should account for all pos-
sible environments on which your ap-
plication will run. That could require
three color sets: one for real color,
one for a color card, driving a
monochrome graphics monitor (as
found in many laptops), and one for
real monochrome. For example:
By always using color scheme
numbers and color set names in your
programs, you can easily change the
colors of all objects in an application
by defining a new scheme or set. This
eliminates all literal color pair defini-
tions from your code and prevents
having to modify the code to change
the display. These commandsrely on
predefined schemes and sets, and
make programs portable:
SET COLOR OF SCHEME <number>
TO SCHEME <number>
SET COLOR SET TO
<color set name>
These commands change the
color pair list within a currently active
color scheme, and make programs
not portable:
SET COLOR OF <object part> TO
<color pair>
SET COLOR OF SCHEME <number>
TO <color pair list>
SET COLOR TO <color pair list>

continued on page 6


L.A. FOX
A monthly publication of the
Los Angeles FoxPro/Foxbase User Group

Published at
2616 Vargas Way
Redondo Beach, CA 90278
(213)371~6035
This newsletter is designed to pro-
vide a forum for users of FoxPro, Fox-
base +, and Foxbase +/Mac to share in-
formation, perspectives, and techàiques.
Please note: This group has no formal
conncction with Fox Software, Inc..
Opinions expressed and liberties taken
herein are the sole responsibility of the
direct perpetrators. Don’t blame Fox
Software.

Editor:
Greg Dunn
Newsletter Design and Producdoa
GayDunn

LA.. FOX Steering Committee
President Greg Dunn
Treasurer George Dvorak
Maillings and Member Benefits
Randy Unruh
Secretary Charles Williams
Contributors Kris Dahlin, Therese
Padrilla

Please send all newsletter
nseterlal to:
Greg Dunn
2616 Vizgas Way
Redondo Beach, CA 90267
(213)371~6O35

All contents Copyright 1990 by the
Los Angeles FoxPro/Foxbase User
Group, unless indicated otherwise.


LA. FOX
The items affected by each Qf the ten color pairs in a single color
scheme are listed in the following table.
PAIR AFFECTED ITEM
1 Text, output, disabled menu bars and pads, Report Band B
2 Current field, input, enabled menu bars and pads
3 Border ______
4 Active object titles
5 Inactive object titles, menu messages
6 Selected objects, text, menu bars and pads
7 Hot keys, clock, current BROWSE record, REPORT empty Band A
8 Shadow
9 Enabled dialog and pop-up controls, REPORT Band A
10 Disabled dialog and pop-up controls, REPORT empty Band B
Specify default color set in Config.fp..
COLOR Set = Real color
Put this code at the begrnrnng of your start-up program.
Syntax : Do < your program> [WmI <Ccolorsetñamc
Notes Assumes Real_color is set in Config.fp.
Resets to Real_mono if using a monochrome card.
Pass name of alternate color set to overnde.
Passing the alternate color set is necessary
because there is no way for the application
to detect when a color card is driving a
monochrome graphics monitor
PARAMETERS new colset && overrides default
DO CASE
CASE P Parameters0 > 0
+
SET COLOR SET TO &new_colset 5~
CASE! ISCOLOR()
_______
SET COLOR SET TO Real mono
ENDCASE
2

2