|
-
Oct 21st, 2005, 04:01 AM
#1
Thread Starter
Member
TextBox control
Hi all,
anybody can please tell me how to set textBox control to take decimal values.
decimal point should already be there in text box control .
thanks
regards
-
Oct 21st, 2005, 09:44 AM
#2
Re: TextBox control
That would require a MaskedTextbox control instead.
-
Oct 21st, 2005, 12:46 PM
#3
-
Oct 21st, 2005, 06:20 PM
#4
Re: TextBox control
The only problem with a mask is that you will generally have to set the number of characters before and after the decimal point. What you may like to do is use a derived TextBox that only accepts numerical values. You can then add a ".0" in the Validating event if the user hasn't entered one. If you follow the "Windows Forms Components" link in my signature you can download a library that includes a NumberBox.
-
Oct 24th, 2005, 07:03 AM
#5
Thread Starter
Member
Re: TextBox control
Thanks to all of you,
actually i have downloaded "valitText .dll" but the problem is that user cant reach to the decimal point by pressing "." and while data-entry user cant use arrow keys or any other keys except numeric keys . so it is useless in dataentry type application. and if i have to do some excercise in text changed event, then what is the use of "validText.dll" . i m still using .net 2002, . is there ready to use control which will facilitate all this needs in 2003 or newer version .
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
|