[.net] MaskedTextBox: allowing negative numbers

Started by
1 comment, last by silverphyre673 17 years, 6 months ago
I have a MaskedTextBox control. I only want to allow the user to input numbers, but I want to allow negative numbers. Specifying a mask of, say, 000 doesn't allow that. Specifying a mask of -000 requires the numbers to be negative. Any ideas? Thanks very much.
my siteGenius is 1% inspiration and 99% perspiration
Advertisement
You can do #000 to allow the first character to be a sign character. Unfortunately, it can also be a number, so if they enter a sign, they can only enter a 3 digit number, but otherwise they can enter a 4 digit number. That's the only way I know...
Thanks!
my siteGenius is 1% inspiration and 99% perspiration

This topic is closed to new replies.

Advertisement