At 3:01 PM +0000 2/24/05, Lennox Jacob wrote:
MsgBox will give a message that the input data is incorrect and then
give the user the chance to correct it, but I would like to have the
user prevented from inputting the data then have MsgBox to go
through the correcting pocess with the user.
Well, there are lots of other ways to handle a validation error. You
could beep and then given the focus back to the EditField, for
example.
Masking with ## will not prevent two-digit values >60, since it will
allow two digits value up to 99.
Ah, you want to disallow any entry except from 1 to 59? That you can
probably do in the KeyDown event. To do it properly, you'll have to
pay attention to whether SelStart is 0 or 1 -- if it's 1, then the
user is typing the second digit, so you should allow any digit. But
if it's 0, and the key pressed is >= "6", then just return true to
prevent it from doing anything.
HTH,
- Joe
--
REAL World 2005 - The REALbasic User Conference
March 23-25, 2005, Austin, Texas
<http://www.realsoftware.com/realworld>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|