Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stopping Lostfocus
Message
From
14/01/2005 15:52:54
 
 
To
14/01/2005 02:47:03
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
00977001
Message ID:
00977349
Views:
25
You can't have a setfocus() if a valid() is anywhere is the program tree. You get an error Therefore a valid event can't call a form for example which might have a setfocus in it. Or have they fixed this now? We often use a form during validation to provide a user opportunity to choose a valid input.


>The best, and correct, approach is to use VALID for validation, thus the name. RETURN=.F. measn failed validation.
>
>>If I use txt.lostfocus as a validation event, what is the best or most correct approach
>>eg...
>>
mytxt.lostfocus
>>***************
>>if ! passvalidation()  && some validation code
>>   this.setfocus()
>>   nodefault
>>   return .f.
>>endif
>>
>>I'm thinking I don't need nodefault and return .f.
Previous
Reply
Map
View

Click here to load this message in the networking platform