Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does numeric TextBox exist?
Message
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00992436
Message ID:
00992730
Views:
28
Eric,
Thanks for posting a link to your article. I created my NumericTextBox class before reading your article, but was happy to find that I had created it very similarly to your class. The only thing I ended up chanding in my class after reading your article was to move the check to see if min or max was violated from the OnKeyPress event to the OnTextChanged event and that cleared up some problems I had regarding selecting text and then pressing a digit.

One problem still remains (both in your class and my class): You can't paste contents of the clipboard into the NumericTextBox control, because of the code in the OnKeyPress event. This is relative simple to change though.

I was surprised to see that you started creating your control using the UserControl, I was under the impression that using the UserControl approach adds a lot of overhead when the usercontrol only contains one control.

Einar

>Great part of the article is on how to create a numeric textbox!
>
>
>>Eric,
>>Thanks for your reply and link. The article seems very familiar and I think I read it many moons ago, but I am still printing it out for a little light bedtime reading :)
>>My original question was not really not how to write a custom control like this, but rather is there something like this built into the .NET framework that I could use instead of writing my own.
>>I am about 75% done writing the control now (taking a long time because of several meetings), so at this point I really hope there is nothing built into the .NET framework to do what I want :)
>>
>>
>>Einar
>>
>>>Have a look at an article I wrote long time ago: http://www.utmag.com/March2003/Page38.asp
Semper ubi sub ubi.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform