Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Column Data ForeColor
Message
From
29/10/2009 03:49:39
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
29/10/2009 02:50:12
Paul Ong
Knights of Christ Foundation
California, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01431831
Message ID:
01432169
Views:
63
Hi Paul

#1 check UT help for the use of the pre tag, that will make your message more readable.
#2your code is
thisform.bASGRID1.Column7.DynamicForeColor=[IIF(tPoDetail.solastwk=0,IIF(MOD(tPoDetail.nrowid,2)=0,RGB(228,228,288),RGB(255,255,255)),RGB(0,0,255))]
I recomend ICASE instead IIF this reduses the number of brackets
THISFORM.bASGRID1.Column7.DYNAMICFORECOLOR=;
 [ICASE(tPoDetail.solastwk#0,RGB(0,0,255),]+;
 [MOD(tPoDetail.nrowid,2)=0,RGB(228,228,288),]+;
 [RGB(255,255,255))]
so now instantiate your form suspend and run the expression (mine or yours) in command window
?ICASE(tPoDetail.solastwk#0,RGB(0,0,255),[MOD(tPoDetail.nrowid,2)=0,RGB(228,228,228),RGB(255,255,255))
Does this run without error? is the result as expected?

#3
RGB(228,228,288)
is invalid

#4 to speed up the expression, use the interger representation of your color
THISFORM.bASGRID1.Column7.DYNAMICFORECOLOR=;
 [ICASE(tPoDetail.solastwk#0,16711680,]+;
 [MOD(tPoDetail.nrowid,2)=0,15000804,]+;
 [16777215)]
HTH

Agnes
>I was very curios so what i did was i put in a button procedure. and then i would reverse its effect on the next click, however, on click i get an error message, something wrong with the code below?
>
>error:
>Expression is invalid,
>
>btw. so you mean i can call the same proc over and over again?
>
>thisform.bASGRID1.Column7.DynamicForeColor=[IIF(tPoDetail.solastwk=0,IIF(MOD(tPoDetail.nrowid,2)=0,RGB(228,228,288),RGB(255,255,255)),RGB(0,0,255))]
>
>thanks in advance...
>
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform