Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Questions about Dynamic Color in Grids
Message
From
02/11/2004 11:39:14
 
 
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:
00957087
Views:
10
I was thinking you could group your tables by date in a temporary cursor using a select command, ordering and indexing it (the cursor) by date.
Then if you set a relation from The main tables into the cursor, you could
set the dynamicBackcolor of the grid like that :
Yourgrid.setall("dynamicBackColor","IIF(mod(recno('GroupCursor'),2)=0,YourFirstcolor,YourSecondColor)","column")
In this way you should switch between two color as the date change.


>Aaron
>
>So what you're saying is each time the date changes you want a different colour? So if the date changes 1,000 times in your grid you'll need to prepare 1,000 colours? In your example, the colour would then change for the toy car.
>
>This is a trifle tricky, don't you think? Or am I reading it too complicated?
>
>>Dear Terry,
>>
>>You're right... we used to use british format on dates!
>>Maybe, I expressed in different way like that...
>>
>>2004/10/1 Pencil <--
>>2004/10/1 Pens
>>2004/10/1 Rubber
>>2004/10/2 Glue <-- Different color automatically... because it is not the same day as the previous records!
>>2004/10/3 Toy car
>>
>>
>>How can I do that?!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform