Here is a rainbow ... Whatever the user wants ...

  * 1     2   3      4      5    6     7      8        9     10    11   12
  *
Black,Red,Yellow,Purple,Pink,Peach,Orange,Lavender,Cream,White,Blue,Green
  * 13   14       15   16      17    18    19   20   21      22    23   24
  *
Gold,Burgundy,Plum,Apricot,Coral,Melon,Lime,Wine,Fuschia,Mauve,Rose,Brown
  lcFindColor = [iif(findcolor = 1,rgb(0,0,0),] + ;
                [iif(findcolor = 2,rgb(255,0,0),] + ;
                [iif(findcolor = 3,rgb(255,255,0),] + ;
                [iif(findcolor = 4,rgb(128,0,128),] + ;
                [iif(findcolor = 5,rgb(255,0,128),] + ;
                [iif(findcolor = 6,rgb(231,146,88),] + ;
                [iif(findcolor = 7,rgb(255,128,0),] + ;
                [iif(findcolor = 8,rgb(140,95,160),] + ;
                [iif(findcolor = 9,rgb(255,255,128),] + ;
                [iif(findcolor =10,rgb(255,255,255),] + ;
                [iif(findcolor =11,rgb(0,0,255),] + ;
                [iif(findcolor =12,rgb(0,128,0),] + ;
                [iif(findcolor =13,rgb(226,203,37),] + ;
                [iif(findcolor =14,rgb(128,0,0),] + ;
                [iif(findcolor =15,rgb(128,0,128),] + ;
                [iif(findcolor =16,rgb(255,128,0),] + ;
                [iif(findcolor =17,rgb(255,192,130),] + ;
                [iif(findcolor =18,rgb(163,255,70),] + ;
                [iif(findcolor =19,rgb(0,255,0),] + ;
                [iif(findcolor =20,rgb(181,34,56),] + ;
                [iif(findcolor =21,rgb(255,0,255),] + ;
                [iif(findcolor =22,rgb(128,64,64),] + ;
                [iif(findcolor =23,rgb(254,1,20),] + ;
                [iif(findcolor =24,rgb(106,53,53),] + ;
                [rgb(0,0,0) ))))))))))))))))))))))))]
  * Set Grid ForeColor
  .SetAll("DynamicForeColor", lcFindColor, "Column")
  * Set Grid BackColor
  .SetAll("DynamicBackColor", "IIF(RECNO()=thisform.gnCurrRec,
rgb(0,255,255), rgb(210,210,210))", "Column")

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Stephen Russell
Sent: Wednesday, September 22, 2010 2:42 PM
To: ProFox Email List
Subject: Re: Change the colour of rows in a grid based on data

On Wed, Sep 22, 2010 at 1:27 PM, Jeff Johnson <[email protected]> wrote:
> This is in the init of the grid
>
>      .SetAll("DynamicBackColor", ;
>         "IIF(RECNO(THIS.RecordSource) = THIS.ncurrentrecord," + ;
>           "THIS.gridactivebackcolor," + ;
>           "IIF(vtank.cur_ostat = 'S'," + ;
>             "RGB(0,255,0)," + ;
>             "IIF(vtank.cur_ostat = 'A'," + ;
>               "RGB(0,200,0)," + ;
>               "IIF(vtank.cur_ostat = 'D'," + ;
>                 "RGB(0,128,0)," + ;
>                 "IIF(vtank.cur_ostat ='W'," + ;
>                   "RGB(255,0,0)," + ;
>                   "IIF(vtank.cur_ostat = 'C'," + ;
>                     "RGB(0,0,255)," + ;
>                     "THIS.griddefaultbackcolor))))))", ;
>         "COLUMN")
>
> This colors the rows in a grid based on order status.    ;^)
----------------

What are you double rainbow man?

;->
--
Stephen Russell

Sr. Production Systems Programmer
CIMSgts

901.246-0159 cell

[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to