Check if editbox contains only digits.

Got a problem you cannot solve? Try here.
Treoxx
Posts: 24
Joined: Fri Jan 27, 2006 6:29 am

Check if editbox contains only digits.

Postby Treoxx » Wed Mar 08, 2006 5:48 am

I like to check if a editbox is filled, only with digits.

I could use the MaskEdit function, but I just do not want to set a defined number of digits. The MaskEdit is nice to set a telephone number format but not for just some digit checking.

I can write some code for it but I thought, first lets ask if there is another simple option to do it.

Thanks!

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Wed Mar 08, 2006 12:03 pm

You could use a mask of the form:

"999999999999999999999999999999999;0; "

Where you add more 9s if necessary. The mask is to be entered without quotes and has a final space at the end. It permits entering as long an integer as there are 9s. But it does not require them all to be entered.

This will allow a free-floating size edit box which will accept only integers. And in the script you can use Parse String to remove all the spaces which will be used as fillers after the last number that was entered.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

Treoxx
Posts: 24
Joined: Fri Jan 27, 2006 6:29 am

Postby Treoxx » Tue Mar 28, 2006 4:05 am

The next problem:

I have 3 MaskEdit boxes where a time has to be set.
When typing a time in the first MaskEdit box the focus jumps straigt to the next Maskedit box after one digit.

The mask is: 99:99;9;

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue Mar 28, 2006 3:48 pm

You probably set the MaxLength field to one. Set it to something bigger. This field auto tabs to the next field when the indicated length is typed in. Set it to 0 to turn this feature off.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

Treoxx
Posts: 24
Joined: Fri Jan 27, 2006 6:29 am

Postby Treoxx » Wed Apr 05, 2006 4:19 am

If I set the edit mask to 99:99;9; the MaxLength is auto. set to 5.
And the maxlength is not changeble after put in a edit mask.
Any idea what else it can be?


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 166 guests