Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New bug?
Message
From
18/06/2008 20:18:18
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Miscellaneous
Thread ID:
01324975
Message ID:
01325320
Views:
10
The mmMaskedTextBox does not appear to be a viable solution to this problem. Specifically, I want a textbox that allows the end user to be able to enter a value in the range from -999999.99 to 999999.99 with the fewest possible keystrokes for any given value. For example when the entire text in the textbox is selected, to enter the value of 0.00 the user should be able to just enter a single keystroke of "0". To enter the value of 123.00 they should be able to just enter 3 keystrokes "123". And finally to enter the value of -12345.60 they should be able to enter only 8 keystrokes "-12345.6".

I have not been able to find a mask to use with an mmMaskedTextBox that allows this behavior. So far it looks to me like the user would be forced to enter preceeding spaces in order to position the digits where they belong. The mmMaskedTextBox does keep the user from entering alpha characters or multiple decimal points or multiple negative signs and that is good, but if the end user must enter spaces to position the digits where they belong, then it is unacceptable.

A regular mmTextBox with TextAlign set to "right" and a format of "F2" does what I want if only it would not cause an unhandled exception when the user accidently enters illegal characters. Upon exiting the textbox I would want the system to alert the user that the text entered was not acceptible and then return to the mmTextBox showing the invalid text as previously entered by the end user. They could then correct the error and proceed without further problems.

If somebody knows a mask to use with an mmMaskedTextBox or a better solution to this problem please let me know.

Sam Tenney
Previous
Reply
Map
View

Click here to load this message in the networking platform