Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Button click after textbox valid doesn't fire?
Message
 
To
04/12/2005 21:23:20
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01074348
Message ID:
01075512
Views:
21
Hi Alan,
I apologize for replying so late...


>I'm having a bit of trouble following something here. You call the chkTxtBox() function from the valid of the text box (call it TextA).

I call chkTxtBox() from the lostfocus of the text box

If everything is ok, you set the txtOk property to True. If the textbox loses focus to some other control (say TextB) then the button when the button is now clicked from TextB, it registers that the txtOk property is True and thinks it's been clicked directly from TextA.
>
>At what point do you set the property to False?
>
>I don't really think this belongs at the control class level since it's such a one-off type of situation, so it still sounds like I have to put code in the gotfocus event of every control on the form to set the property to .F. unless I'm missing something obvious.

Yes, you need to set txtOk to .F. in the gotfocus of each control that could get focus - in my case, I only had the save, cancel, and 3 other controls enabled.
Doru
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform