Hello,
How do i limit the amount of characters in a masked textbox? I can do it in a normal textbox but not in a masked textbox because there is no option to limit the size.
Regards.
Printable View
Hello,
How do i limit the amount of characters in a masked textbox? I can do it in a normal textbox but not in a masked textbox because there is no option to limit the size.
Regards.
Hi,
You can find some good infomation here.
Hey,
The size would automatically be limited by the amount of characters that you put in your mask would it not?!?
What sort of mask are you trying to create, and what mask have you already tried to use?
Gary
I just want to know how you would only allow the following in a masked textbox:
numerics
maximum amount of characters of 1
Regards.
Use a NumericUpDown Class :)
http://msdn.microsoft.com/en-us/libr...ricupdown.aspx
And set the maximum value to 9.
Alternatively, use a MaskedTextBox with a mask of "9".
That should do it.
Gary
gep13 is right, just use the mask itself as the limiting factor....
so in the mask field enter "9" if you want to only allow number or a space....but i think what your looking for is "0" so this forces user to enter a number and does NOT allow spaces.