Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Button click after textbox valid doesn't fire?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Divers
Thread ID:
01074348
Message ID:
01075512
Vues:
20
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform