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!
Check if editbox contains only digits.
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
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.
"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/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
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/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: No registered users and 166 guests