|
-
Mar 17th, 2009, 01:52 PM
#1
Thread Starter
Junior Member
Limiting the characters in a masked textbox?
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.
-
Mar 17th, 2009, 02:09 PM
#2
Re: Limiting the characters in a masked textbox?
Hi,
You can find some good infomation here.
-
Mar 17th, 2009, 02:16 PM
#3
Re: Limiting the characters in a masked textbox?
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
-
Mar 17th, 2009, 02:18 PM
#4
Thread Starter
Junior Member
Re: Limiting the characters in a masked textbox?
I just want to know how you would only allow the following in a masked textbox:
numerics
maximum amount of characters of 1
Regards.
-
Mar 17th, 2009, 02:20 PM
#5
Re: Limiting the characters in a masked textbox?
Use a NumericUpDown Class 
http://msdn.microsoft.com/en-us/libr...ricupdown.aspx
And set the maximum value to 9.
Last edited by gep13; Mar 17th, 2009 at 02:25 PM.
-
Mar 17th, 2009, 02:24 PM
#6
Re: Limiting the characters in a masked textbox?
Alternatively, use a MaskedTextBox with a mask of "9".
That should do it.
Gary
-
Mar 17th, 2009, 06:58 PM
#7
Member
Re: Limiting the characters in a masked textbox?
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|