Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Column Data ForeColor
Message
From
28/10/2009 05:02:02
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
28/10/2009 04:34:38
Paul Ong
Knights of Christ Foundation
California, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01431831
Message ID:
01431833
Views:
64
>Hi,
>
>Is it possible to have a different forecolor for each record in a given column, for example, column1 has the ff: 1,2,4,0,5, i wanted the column with values to have a color blue, otherwise red (zeroes)
>
>column1
>1
>2
>4
>0
>5
>
>is this possible in design time or programmatically.
>
>Thank you very much..

Hi Paul,

basicaly yes.

The column owns DYNAMICFORECOLOR property, this will do the job. You need to enter a string that will return a RGB value like

column1.DYNAMICFORECOLOR = "ICASE(RECNO()=1,RGB(2000,0,0),RECNO()=2,13107200,RECNO()=3,RGB(0,0,0),0"

Now the problem.
RECNO() is not a very good idea. As soon as an ORDER is set, RECNO() will not represent the order of records anymore, so your grid looks a bit colorfull.

Also I figured out that DYNAMICBACKCOLOR will be better to represent information.

Hint: Designing colorfull patterns, remember yourself that a lot of people have problems with there color vision. Give the user a way to alter your settings.

Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform