gettingstarted
[Top] [All Lists]

Re: masking

To: gettingstarted at lists dot realsoftware dot com
Subject: Re: masking
From: "Lennox Jacob" <lenpartico at hotmail dot com>
Date: Thu, 24 Feb 2005 16:40:29 +0000
Delivered-to: gettingstarted at lists dot realsoftware dot com
Thanks Joe,
I got the idea, but the coe is beating me, this is what I have:
 If me.selstart = 0 and Chr??? >= 6
   return false
 end if

I don't know what to put at chr??? .
Kingly assist


From: "Joseph J. Strout" <joe at realsoftware dot com>
Reply-To: Getting Started <gettingstarted at lists dot realsoftware dot com>
To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: masking
Date: Thu, 24 Feb 2005 09:47:18 -0600

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>

_________________________________________________________________
Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/

_______________________________________________
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>

<Prev in Thread] Current Thread [Next in Thread>