Restrict the user to enter only digits in the Edit box
Posted: Wed Jun 04, 2008 6:09 am
Hello,
I have a dialog in my installation where the user enters some values. These values are allowed to contain only digits. If I use normal edit boxes the user can also enter non-digit characters. There is a suggestion in the forum that masked edit can be used. This is a solution but in that case the user can click on a position in the masked edit and enter a value with spaces before the beginning. And it doesnt look good. Is there another way to force the user to enter only digits.
Thanks a lot,
Serhan
I have a dialog in my installation where the user enters some values. These values are allowed to contain only digits. If I use normal edit boxes the user can also enter non-digit characters. There is a suggestion in the forum that masked edit can be used. This is a solution but in that case the user can click on a position in the masked edit and enter a value with spaces before the beginning. And it doesnt look good. Is there another way to force the user to enter only digits.
Thanks a lot,
Serhan