Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Skipping LostFocus Event
Message
De
10/06/1998 11:31:53
 
 
À
09/06/1998 20:18:24
David Turnedge
Turnedge Associates
Sydney, Australie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00106540
Message ID:
00106784
Vues:
27
>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
Fil
Voir

Click here to load this message in the networking platform