Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing colors in grid
Message
From
27/08/2001 03:54:44
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
26/08/2001 19:42:37
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00549301
Message ID:
00549359
Views:
16
>Hi All
>
>I have been trying to get a grid to change forecolor when someone changes the data in a grid. I have tried several methods and what I have found is the object model is not working as I thought is should. I wrote a litte test program that displayed the object name in the debug window and the following results
>
>dynamicforecolor = checkname(this.name)
>What I found was the name returned was the grid name not the column name. What I need to do is to change the color useing a variation of getfldstate(this.controlsource) but I can't do this if I can't get a reference to the column object. I also have complicated this even more by having some columns with a container of two text objects. This would work as well if I could get the column reference.
>
>Any ideas would be appreciated.
>
>Thanks.

James,
In dynamic* setting 'this' always refers to grid itself. In init code dynamicbackcolor to have column refrerence :
with this
 for each oColumn in .Columns
   oColumn.DynamicForeColor = '(thisform.CheckName('+oColumn.Controlsource+'))'
 endfor
endwith
Also there is varread() that would work to a point.
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