Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic Color in Grid
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00244921
Message ID:
00245320
Views:
24
>>In the init of the grid class a replace the textbox for each column. If any code was added at design time to the textbox it gets replaced doesn't it?
>
>What I mean is to add the Gotfocus code to your textbox class, not the grid class. The grid class would only get the "master" color properties like the nbackcolor above...

Right. I create MyGrid class. Add prop MyColor to grid. Add code to grid AARC to set DynamicColor stuff.

I also create MyTextBox class. Add this.backcolor = this.parent.parent.MyColor to gotfocus event.

In MyGrid init add code to addobject MyTextBox to each column.

Now I drop MyGrid on a form run it and it works fine.

A side effect of this is that you can't add any code to the grids text box without doing it at the MyTextBox class level.

If I drop Mygrid on a form and want to add some code to the text box click I can't, it gets replaced at runtime.
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform