Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Coloring grids
Message
From
08/02/2006 16:27:14
 
 
To
08/02/2006 16:19:11
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01094787
Message ID:
01094791
Views:
14
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
Previous
Reply
Map
View

Click here to load this message in the networking platform