Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 To: Samir H.
  Where is Samir H.?
 Yogyakarta
 Indonesia
 Samir H.
 Tags
Subject: RE: DynamicBackColor >255
Thread ID: 289028 Message ID: 289042 # Views: 40 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Grids
Date: Tuesday, December 28, 2010 5:20:49 AM         
   


> >
> > Yes that is one reason. Since you are using VFP9, use ICASE() instead of IIF(). To make it readable, use semicolons. Also, you can remove the table name:
> >
> > This.Grid1.SetAll("DynamicBackColor", ;
> >     "ICASE(TRIM(notes)='YELLOW',RGB(247,247,171),;
> >     TRIM(notes)='BLUE',RGB(214,216,250),;
> >     TRIM(notes)='GREEN', RGB(214,250,214),;
> >     TRIM(notes)='RED',RGB(255,224,193),;
> >     TRIM(notes) = 'BROWN',RGB(207,159,111),;
> >     RGB(255,255,255))","Column")

> >
> > Further, since you are using RGB() in the IIF(), you cannot use Column1.BackColor because it returns a numeric representation of RGB(). To avoid it, use RGB() likewise on the OTHERWISE portion of ICASE() as shown above.
>
>
> "...you cannot use Column1.BackColor..."
> Why not? They all return numeric values, column1.backcolor as well as rgb().
>
>
> >
> >
> > http://www.junblogs.com/
> > http://weblogs.foxite.com/sandstorm36/default.aspx
> > http://www.coderisland.com/forum/viewforum.php?f=10
>
>
>
> Regards
> Samir

Ah yes, my mistake. :-)


http://www.junblogs.com/
http://weblogs.foxite.com/sandstorm36/default.aspx
http://www.coderisland.com/forum/viewforum.php?f=10

ENTIRE THREAD

DynamicBackColor >255 Posted by ursula @ 12/28/2010 3:38:08 AM
RE: DynamicBackColor >255 Posted by Samir H. @ 12/28/2010 3:49:01 AM
RE: DynamicBackColor >255 Posted by Jun Tangunan @ 12/28/2010 4:38:12 AM
RE: DynamicBackColor >255 Posted by Samir H. @ 12/28/2010 5:05:37 AM
RE: DynamicBackColor >255 Posted by Jun Tangunan @ 12/28/2010 5:20:49 AM
RE: DynamicBackColor >255 Posted by ursula @ 12/28/2010 5:10:02 AM
RE: DynamicBackColor >255 Posted by Cetin Basoz @ 12/28/2010 12:11:13 PM