Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid column: dynamicforecolor problem
Message
From
28/06/2005 04:07:28
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01026334
Message ID:
01026940
Views:
13
>I have a grid column that contains a command button, which launches a memo edit form when clicked. I want to color the caption of the button to be either blue if there is a value in a memo field or black if emtpy.
>
>I have tried using:
>
>.column32.dynamicforecolor = 'IIF( EMPTY(tmpfcis.fciscomm), "RGB(0,0,0)", "RGB(0,0,255)" ) '
>
>
>But this results in no coloring. If i use the following:
>
>
>.column32.dynamicforecolor = IIF( EMPTY(tmpfcis.fciscomm), "RGB(0,0,0)", "RGB(0,0,255)" )
>
>
>(i.e. no quotes around the IIF) the captions on all of the commandbuttons are blue.
>
>I've done this before but cant recall what worked.

Unfortunately I haven't seen this before. Check FAQ #7934. Setting DynamicForeColor directly wouldn't work. You need something like this:
.Column32.DynamicForeColor = "(thisform.myColor(this.Column32.myCommandButton,tmpfcis.fciscomm))"

*myColor
lparameters toObj,tuValue
toObj.ForeColor = IIF( EMPTY(m.tuValue), 0, 0xFF0000 )
return 0
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform