|
-
Aug 6th, 2006, 06:34 PM
#1
Thread Starter
New Member
[RESOLVED] How make a textbox numeric?
Hi,
could you please help me with this one: How do I make a textbox numeric? And also, how do I format the text length? I.e. I want the user to input numbers with maximum 2 digits only.
-
Aug 6th, 2006, 06:44 PM
#2
Hyperactive Member
Re: How make a textbox numeric?
Using a NumericUpDown box instead is probably easier. You can set the max/min, number of d.p.s and it only accepts numbers
-
Aug 6th, 2006, 07:01 PM
#3
Thread Starter
New Member
Re: How make a textbox numeric?
Thanks, very good! I was not aware of this control.
While we're at it, do you know if it is possible to make a textbox numeric?
-
Aug 6th, 2006, 07:19 PM
#4
Re: How make a textbox numeric?
This question has been asked and answered numerous times, so a forum search should give you plenty of information. The best implementation of a numeric TextBox I've seen is the NumberBox in the WFC library in my signature. It's pretty easy to handle KeyPress events to handle the majority of situations but, as always, the devil is in the detail. It becomes tricky to handle the less common sets of circumstances, but you've still got to account fopr those circumstances because if there's a way to break your app then users will find it.
-
Aug 6th, 2006, 07:53 PM
#5
Thread Starter
New Member
Re: How make a textbox numeric?
Nice! I downloaded NumberBox and it is working fine!
Thanks a lot!
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
|