Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coloring grids
Message
De
08/02/2006 16:27:14
 
 
À
08/02/2006 16:19:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01094787
Message ID:
01094791
Vues:
13
You can use nested iif(), but it looks nasty. Better create a function:
Function ValueColor
lparameter nValue
local lnColor
  Do Case
    Case nValue=0
      lnColor=Rgb(255,255,0)
    Case nValue<0
      lnColor=Rgb(255,200,200)
    Case nValue<10
      lnColor=Rgb(255,100,100)
    Otherwise
      lnColor=Rgb(255,255,255)
  Endcase
return lnColor
yourgrid.SetAll('dynamicbackcolor','ValColor(yourtable.yourfield)','column')
>Hi all,
>
>Can you display more then 2 colors dynamically within a Grid. I'd like to color individual cells to one of 4 different colors depending on data in record. Setall allows only for 2.
>
>thanks in advance,
>
>Don
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform