Restrict the user to enter only digits in the Edit box

Got a problem you cannot solve? Try here.
Post Reply
serk
Posts: 6
Joined: Wed Jun 04, 2008 5:57 am
Location: Germany

Restrict the user to enter only digits in the Edit box

Post by serk »

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
Alex_Ronquillo
Site Admin
Posts: 364
Joined: Mon Jul 30, 2007 11:51 am
Location: USA
Contact:

Post by Alex_Ronquillo »

Serk,

I am sorry to tell you that there is no other way to do this. Mask edit would have to be the way to go for it.
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
serk
Posts: 6
Joined: Wed Jun 04, 2008 5:57 am
Location: Germany

Post by serk »

Hi Alex,
Thanks for the answer. The tool is really great. But i faced the following problems.

1) The problem with the masked edit is that normally when you click somewhere on a windows control like edit box or a masked edit the cursor position goes automatically the beginning of the edit box. In installaware, in the masked edit one can click on the middle of the box and
enter a value with spaces before and after the value. The cursor does not go automatically to the beginning. This is a very small problem, but prevents us from buying installaware and deploying our installation with installaware. Is there a way to correct this.

2) Call Dll Function works correct on my development machine. But on a clean operating system (only XP SP) it doesnt work correctly. What can be the reason for that? The relevant entries in the forum was not helpful.

Thanks a lot in advance,
Serhan
Post Reply