Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid DynamicBackColor trick
Message
From
11/04/2001 13:27:01
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
10/04/2001 03:27:09
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00492054
Message ID:
00494530
Views:
21
>>>
>>>Of course, the best you can do is influence the process of creating the cursor in the first place, and add an integer column with actual color number. Then there's no iif, noarrays and no function at all, and you can use all the colors you like:
>>>>
'tran(myColorField)'
>>>>No iif() too :)
>>>Nothing at all :)
>>
>>OK, I was too quick. Not an integer column, but a character column with the tran() of the color number. Therefore:
>>
'myalias.myColorField'
>
>And I was too quick to say no iif() :) Made a pitfall and sensed for a moment ascan() was returning 0 or 1 :)
>Cetin

I actually tried it now (ok, should have tried before) - well, the field needs to be numeric (preferably integer), and it works just fine. I tried it on one of more complicated grids, which has regular textboxes in columns 1 and 3, and containers in 2, 4 and 5. The containers are populated with controls in form's init. The grid is based on a cursor which is created at form's .init, based on parameters passed, and then the recordsource for the grid is set, etc etc. It errors out when I assign the controlsource
ThisForm.evalgrd.Column3.Text1.controlsource='TMPEVALBTCH.FORMDESC'
with the error
Parent object will not allow this property setting for evaledit1.evalgrd.column3.text1.ControlSource.
Error code is 0 (zero), there's no error checking in place, and the value of the controlsource is, accidentally, exactly what I want it to be (it was set automatically when I set the recordsource for the grid). The column doesn't have a controlsource.

I have really never seen this error. The colors, though, look really nice. I'm thinking of a rainbow grid, once I solve this one :)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform