Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to check for not empty user's input
Message
From
13/11/2006 13:42:25
 
 
To
13/11/2006 06:23:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01169089
Message ID:
01169249
Views:
7
Beware of traps using the Valid event. If the user's cursor is in the input box (textbox, combo, etc.) and then they try to "Cancel" the input form via a mouse click to a Cancel commandbutton, they can't. The valid event of the input box will fire and if it is empty, they will not be able to "Cancel" until something is entered.

You will need to provide a means to cancel using the commandbutton and by-pass the valid event. One way to do this is to set a custom property in the input box, CheckValid and set it to true when the input box is entered. In the commandbutton for cancel, in the mouseenter event set the CheckValid property to false; in the mouseleave event set it back to true. Then in the valid event have an IF statement to check for CheckValid is true before performing the EMPTY check.
Previous
Reply
Map
View

Click here to load this message in the networking platform