Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>I have a form with a text box that has a custom LOSTFOCUS event.
>
>My intention is that whenever the user tabs, clicks out of or otherwise leaves the text box it will test itself for any changes and 'do it's thing'.
>
>Trouble is that LOSTFOCUS seems to be triggering intermittently.
>
>Are there any known issues, or a better way, for me to place my routine (I'd use VALID but I want to direct the focus to another control given a certain event, and VFP 5.0 tells me that I can't do a SETFOCUS within a VALID event).
>
>Help!
>
>David Turnedge
>Sydney, Australia
Are you aware that clicking on a button on a toolbar, when your text box has the focus causes it to momentarily lose focus and fire the lostFocus method? Just a thought.
In answer to your question: you could put the code in the InteractiveChange method of the field. You can set a flag on the form so that the "custom" code of the LostFocus method fires only when the flag is set. This is tricky to debug and not my first choice for solving the intermittent behavior.
Good luck
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement