PDA

View Full Version : disable mouse click in input box?


ronwilliams
09-29-2009, 12:52 PM
How can I prevent the user from clicking inside the input box?
I have already used Screen.SetFocus to activate the input box, but some users keep on clicking inside the box and thus causing a space in some instances. I use this when they need to enter a 4 digit key.

I think what I actually meant to say is how do I prevent a user from entering spaces into a input box?
Thanks
ron

jassing
09-29-2009, 01:29 PM
Why not just trim the spaces off the entry?

ronwilliams
09-29-2009, 02:20 PM
Sorry for sounding stupid, but how do I do this in SF8?

jassing
09-29-2009, 02:46 PM
String.TrimLeft() and String.TrimRight()

pww
09-29-2009, 03:18 PM
another way could be to use Dialog.MaskedInput or an Edit Field control and set the mask so that only digits are accepted.

ronwilliams
09-29-2009, 03:28 PM
THANKS!

I will do this!