by Michael S. Kaplan, published on 2007/12/20 10:01 -05:00, original URI: http://blogs.msdn.com/b/michkap/archive/2007/12/20/6817396.aspx
So, the other day, someone was asking for a TextBox that would better support decimal or currency values:
What he want is a simple control to allow him to enter decimal or currency values. He would prefer behavior that looks a lot more like a standard text box, rather than showing the mask or dictating the number of digits. He'd like it to be aware of the decimal functionality and handle it properly (e.g. he want to be able to type 1.23 regardless of how long the entry can be).
This seems like such a simple and fundamental control.
He suggests that .NET Framework would provide such a control.
Somebody over on the .NET Framework team had an interesting answer:
We wrote a full-featured sample DecimalTextBox control that can be installed from here.
Now I did find the control to be an interesting sample.
With that said, I gave a hard time calling anything that does not handle the globalization side of the equation full-featured, if you know what I mean.
The problems with the control?
Well, it uses NumberFormatInfo.CurrentInfo for its number formatting information, which means that it does not pick up user overrides -- and thus if the user customizes their settings, the customizations are not picked up.
And of course there is no mechanism to pick up user changes that happen after launch, either.
It does not do anything special to handle bidirectional support.
Its notions about group separators have severe limitations.
Now I do think such a control could indeed be useful worldwide, but I can't help feeling the whole internationalization issues section of the spec could have used a little more research, and subsequent to that research, a little more support.
Because full-featured in this market, coming from Microsoft, has to mean full support for all of our customers, not just the ones with "convenient" settings....
This post brought to you by , (U+002c, aka COMMA)
go to newer or older post, or back to index or month or day