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


> Hi all,
>
> I got an error saying "unrecoqnized command verb" when I use this syntax below. I notice that actually because the syntax is more than 255 char. Please advise how should I do.
>
>
Thisform.grdlcsrch.SetAll("DynamicBackColor", ;
>     "IIF(TRIM(tmpLpsd.notes)='YELLOW',RGB(247,247,171),IIF(TRIM(tmpLpsd.notes)='BLUE',RGB(214,216,250),IIF(TRIM(tmpLpsd.notes)='GREEN',;
>     RGB(214,250,214),IIF(TRIM(tmpLpsd.notes)='RED',RGB(255,224,193),IIF(TRIM(tmpLpsd.notes)='BROWN',RGB(207,159,111),THIS.Column1.BackColor)))))", "Column")

>
> Thanks
> Ursula

To make the string shorter:
- use ICASE() instead of several IIF()
- convert RGB(a,b,c) to a numeric value, i.e 1679876
- call a function in dynamicbackcolor, i.e "thisform.setColumnColor()"

Regards
Samir

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