>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:
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