Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Skipping LostFocus Event
Message
From
10/06/1998 11:31:53
 
 
To
09/06/1998 20:18:24
David Turnedge
Turnedge Associates
Sydney, Australia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00106540
Message ID:
00106784
Views:
28
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform