Home > Archive > Smartphone Developer Forum > January 2005 > numeric textbox
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| How do you force numeric input in a textbox using c#
| |
|
|
|
|
|
| thanks for the replies
"riki" <see_my_home@page> wrote in message
news:eb2$f1YAFHA.1908@TK2MSFTNGP15.phx.gbl...
> Harry wrote:
>
> try:
> OpenNETCF.WindowsCE.Forms.InputModeEditor.SetInputMode()
>
> from opennetcf.org. It just sets the input mode to numeric, it doesn't
> do any fancy subclassing/overiding.
>
> riki
>
>
> main(){printf("%d != %d, why?", sizeof('"')["'"],
> ,(sizeof('"'))["]\"\0["]);}
> By Night:
> ThemeChanger for Smartphone : http://homepages.inspire.net.nz/~gambit/
> AbstractStart for Smartphone :
> http://homepages.inspire.net.nz/~gambit/AbstractStart/
> By Day: http://www.EmbeddedFusion.com
| |
| Douglas Harber 2005-01-24, 4:02 pm |
| Presumably, this just sets the keypad input more to numeric. Nothing
prevents the user from changing it back to alpha and entering alpha text in
the box.
If you want to allow only numeric input, I think you need to handle that
specially.
Doug Harber
"riki" <see_my_home@page> wrote in message
news:eb2$f1YAFHA.1908@TK2MSFTNGP15.phx.gbl...
> Harry wrote:
>
> try:
> OpenNETCF.WindowsCE.Forms.InputModeEditor.SetInputMode()
>
> from opennetcf.org. It just sets the input mode to numeric, it doesn't do
> any fancy subclassing/overiding.
>
> riki
>
>
> main(){printf("%d != %d, why?", sizeof('"')["'"],
> ,(sizeof('"'))["]\"\0["]);}
> By Night:
> ThemeChanger for Smartphone : http://homepages.inspire.net.nz/~gambit/
> AbstractStart for Smartphone :
> http://homepages.inspire.net.nz/~gambit/AbstractStart/
> By Day: http://www.EmbeddedFusion.com
| |
|
| Douglas Harber wrote:
> Presumably, this just sets the keypad input more to numeric. Nothing
> prevents the user from changing it back to alpha and entering alpha text in
> the box.
>
> If you want to allow only numeric input, I think you need to handle that
> specially.
yes it does stop alpha input (I have a spin control next to my box - so
perhaps it's to blame)
riki
main(){printf("%d != %d, why?", sizeof('"')["'"],
,(sizeof('"'))["]\"\0["]);}
By Night:
ThemeChanger for Smartphone : http://homepages.inspire.net.nz/~gambit/
AbstractStart for Smartphone :
http://homepages.inspire.net.nz/~gambit/AbstractStart/
By Day: http://www.EmbeddedFusion.com
|
|
|
|
|