Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Questions about Dynamic Color in Grids
Message
From
02/11/2004 06:24:45
 
 
To
02/11/2004 05:55:21
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
MySQL
Miscellaneous
Thread ID:
00956908
Message ID:
00956920
Views:
15
Aaron

Something like:
With Thisform.grdYourGrid
  .SetAll( "DynamicBackColor", "IIF( DateField = ldSelectedDate, ;
           RGB( 0, 0, 255), RGB( 255, 255, 255))", "Column")
Endwith
But if you want a different colour for EACH date that's a bit trickier. I think you'd have to first evaluate all your indiv. dates, maybe putting them in an array. Then you could have a function to determine the colour, according to the date, which returns a char RGB() result string, and use this function in the Setall.

e.g.
.SetAll( "DynamicBackColor", Thisform.lmGetColor(), "Column")
HTH

Terry

>Hi All,
>
>I would like to ask about the dynamic color in a grid to display a series of records which are sorted according to the date of entries. I want to display the records with same date in same color.
>
>How can I do that?
>
>
>Best regards,
>Aaron
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform