Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Prevent Valid firing when clicking outside text/editbox
Message
From
28/05/2005 00:27:24
 
 
To
27/05/2005 20:39:13
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01018326
Message ID:
01018339
Views:
10
This message has been marked as the solution to the initial question of the thread.
>Is there anyway to prevent a textbox or editbox's Valid event from firing if a user clicks on the form outside of one these controls? I'm not talking about when a user clicks on another control that can gain focus - I'm talking about when a user clicks on the form or on controls like containers, shapes, lines, etc that do not gain focus themselves?
>
>Thanks!
>Malcolm


Hi Malcolm,

This is not a good solution, but I think it works. Just try it <*g*>
*** Textbox Valid Event
***********************
Local array la_MouseObject[1]

If mdown()
   = AMouseObj( la_MouseObject )
   If inlist( upper( la_MouseObject[1].Class ), ;
         'FORM', 'LABEL', 'SHAPE', 'LINE', 'CONTAINER' )
      Return 0
   endif
endif

*** Do your validation
Wait 'Valid Event is fired' window nowait
Regards
Herman
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform