Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DynamicForeColor on Textbox in a container in a grid
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00451525
Message ID:
00451603
Views:
29
Hi Larry,

Yes, that's what I am going to do. I am going to provide this (and other - like save/restore grid settings functionality) possibility with
OnBeforeHighlight_Row and OnPostHighlight_Row methods. In fact, I already have the working version of it. :)
This way it is done in my Click-Transparent controls (see my article in December FPA) with OnBeforePassClick and OnPostPassClick methods where the user can add the subclass- or instance-specific code to perform whatever else s/he wants.
In fact, CntGridCover sample class provided there shares the code with the GridHighlighter and uses OnPostPassClick to provide multiple-record-selection-in-a-grid functionality.

>Nick,
>With all the possibilities, you could be getting into a deep pit here. I suggest you specify a hook interface that you support. Your class will pass color information to the specified method/property of the Container. Then developers could implement that information anyway they wanted at the container level.
>
>Just my $0.02.
>
>
>>>>Hi,
>>>>
>>>>I want to change the forecolor on a textbox which is placed in a container which again is placed in an grid.
>>>>
>>>>If the value is >= 5 the forecolor should change to RED.
>>>>
>>>>Is this possible ?????
>>>
>>>Yes. Have the DynamicForeColor of the Grid.Column call a function that not only returns a valid color but sets the Textbox ForeColor as well. You can create a grid class with a special function for that or call a form level method.
>>>
>>>HTH.
>>
>>I can add such functionality to my GridHighlighter class.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform