Sytze, 

Friends
Sorry about my stuff up with the comma
Of course, it was a typo with rgb(192,19,2,192)

Even so, I can't get it to work
I've even tried
col1="RGB(192,192,192)"
col2="RGB(255,255,255)"
colcond=IIF(AT("BYE",sp605.courtc6)=0,.f.,.t.)
Thisform.Grid1.Columns(7).DynamicBackColor = "IIF(colcond,&col1,&col2)"

I'll now move on

------------------------------------------------

Maybe some comments will help:

Coming into the icase command below, rgc_jt1 (through 7) contain RGB
expressions e.g.  "rgb(255,255,128)" obtained from a control table in the
code above.
It doesn't matter how these RGB strings were obtained, so long as they exist
when the grid's dynamicbackcolors are set by the code below

Using the expression &rgc_jt1 in the icase command converts the RGB string
into its numeric equivalent, e.g.  8454143


* Sunday column
 Thisform.Grid1.Columns(1).DynamicBackColor = ;
  "icase(atc(trim(wschctls.jt1name),gridjobs.sun) <> 0, &rgb_jt1, " + ;
   "atc(trim(wschctls.jt2name),gridjobs.sun) <> 0, &rgb_jt2, " + ;
   "atc(trim(wschctls.jt3name),gridjobs.sun) <> 0, &rgb_jt3, " + ;
   "atc(trim(wschctls.jt4name),gridjobs.sun) <> 0, &rgb_jt4, " + ;
   "atc(trim(wschctls.jt5name),gridjobs.sun) <> 0, &rgb_jt5, " + ;
   "atc(trim(wschctls.jt6name),gridjobs.sun) <> 0, &rgb_jt6, " + ;
   "atc(trim(wschctls.jt7name),gridjobs.sun) <> 0,
&rgb_jt7,RGB(255,255,255))"


WSCHCTLS.JTxNAME is a job type, e.g. "service call"  (there are 7
possibilities)

Gridjobs.sun is a string of info extracted from a job scheduled for a given
column's day of week. This string contains embedded job types, e.g. "service
call". 

When a string contains a job type that matches one of those in the list (of
7),  the cell's color is set to its corresponding &rgc_jtx value.

If no match is found for the job type, the default color is set to
RGB(255,255,255)

The icase command references colors using both numeric values and an RGB
expression.


Bill


_______________________________________________
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