Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Painted Myself into a Corner with Refresh?
Message
 
To
08/06/2001 09:19:28
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00516845
Message ID:
00516852
Views:
10
This message has been marked as the solution to the initial question of the thread.
>I have Textboxes based on classes that depending on the value of a Form property ("C" for Change, "A" for Add, etc.) will do things like change the format of the Textbox so they look a certain way depending on the action that is going on. For example, I set the Enabled property to True in the Refreshes of the classes when the form is in "Add" mode, but when it is in "View" mode, Enabled is set to False. It works great under "normal" conditions, but the problem is that if I have a Textbox that should be disabled due to a value of another object selected by the user, the Refresh may override it. Do I need to remove the functionality in the Refreshes or is there another way to handle this? Thanks!
>
>Regards, Renoir

Renoir,
If your Refresh code is in the class, you may override it in the certain textbox instance like:
* textbox7.Refresh()
dodefault()
this.enabled = IIF(thisform.textbox2.value = somevalue, .f., this.enabled)
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
Next
Reply
Map
View

Click here to load this message in the networking platform