Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic Grid Color
Message
From
29/03/2001 20:56:05
 
 
To
29/03/2001 20:29:23
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00490152
Message ID:
00490156
Views:
11
You can set it to a method call.
Say you want it a different color for different days of the week,

the method:
** GridColor
LParameters tcDay

Do Case
Case tcDay = "Sunday"
     lnRetVal = RGB(255,255,0)
Case tcDay = "Friday"
     lnRetVal = RGB(0,0,255)
Case tcDay = "Monday"
     lnRetVal= RGB(0,255,255)
Case tcDay = "Thursday"
     lnRetVal = RGB(0,255,0)
Otherwise
     lnRetVal = RGB(255,255,255)
EndCase
Return lnRetVal
To set it:
this.SetAll("DynamicBackColor", "thisform.GridColor(dates.cday)")
then something similar for the fore colors...
HTH

>Help....
>
>I have been tring to create a grid that will change foreground and backcolors of the fields based on the data in thw database. I have tried using IIf statements and they work if I want only 2 color options, I am tring to get a total of 4 color options for each the foreground and the background.
>
>I have tried using case statements but then the grid does nothing.
>
>Any ideas??????
>
>Rich
Insanity: Doing the same thing over and over and expecting different results.
Previous
Reply
Map
View

Click here to load this message in the networking platform