Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Questions about Dynamic Color in Grids
Message
De
02/11/2004 06:24:45
 
 
À
02/11/2004 05:55:21
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
MySQL
Divers
Thread ID:
00956908
Message ID:
00956920
Vues:
16
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform