Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Valid/LostFocus events in VFP 5.0
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Valid/LostFocus events in VFP 5.0
Miscellaneous
Thread ID:
00198161
Message ID:
00198161
Views:
110
I am converting our 3.0 project to 5.0. I have found a difference in the way 3.0 and 5.0 handles the LostFocus method.

This is the situation:

A data entry grid; user enters a numeric code; valid event determines whether it is a valid code and returns .T. if it is valid; then the LostFocus method runs a routine. That routine may or may not call one or two small modal forms. If the routine does call one or both of the small modal forms, the LostFocus method is again fired. This cause a continuous loop of calling the routine that displays the small form that triggers the LostFocus event/method, etc.

It seems that when the LostFocus method is being called, the focus has not yet been lost and when a modal form pops-up, the LostFocus method of the original TextBox in the grid has to be called since it at that point still had the focus. I should mention that the grid is on a PageFrame; at this point I don't know if this is relevant.

I have coded a workaround (set a form property that basically determines whether or not to run the LostFocus code - the first line of the LostFocus method checks this property), but I am wondering if there is an easier solution. Maybe I am missing something...

Joe
Joseph C. Kempel
Systems Analyst/Programmer
JNC
Next
Reply
Map
View

Click here to load this message in the networking platform