BUG: The value in the NumericUpDown control does not reset to the maximum or minimum value if you use the TAB key or mouse to shift focus (814347)
The information in this article applies to:
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual Basic .NET (2002)
- Microsoft Visual C# .NET (2003)
- Microsoft Visual C# .NET (2002)
Beta Information This article discusses a Beta release of a Microsoft
product. The information in this article is provided as-is and is subject to
change without notice.
No formal product support is available from
Microsoft for this Beta product. For information about how to obtain support
for a Beta release, see the documentation that is included with the Beta
product files, or check the Web location from which you downloaded the release.
SYMPTOMSThe value in the NumericUpDown control does not reset to the maximum value if you type a value
that is greater than the maximum value of a NumericUpDown control, and then press the TAB key or use a mouse to shift
focus. Similarly, when you type a value that is less than the minimum value of
the NumericUpDown control, the value does not reset to minimum value. If you press
the ENTER key in the NumericUpDown control, the maximum value or minimum value is set.CAUSEWhen you type text in the NumericUpDown control, the Text property of the control is set to the new value. When you press
the TAB key or use a mouse to shift your focus, the Value property of the control does not change. The Value property of the control continues to hold the previous value.
Therefore, the value in the control does not change. When you use the Value property in code or you press the ENTER key in the control, the Value property is set to the text that you type. The new value is
validated between the minimum and maximum values.RESOLUTION To work around this bug, add sample code to access the Value property in the validating or validated event for NumericUpDown. For example, add the following code in the
NumericUpDown1 validating or validated event: Visual Basic .NETConsole.WriteLine(NumericUpDown1.Value) Visual C# .NETConsole.WriteLine(numericUpDown1.Value); STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 2/3/2006 |
---|
Keywords: | kbvs2005swept kbvs2005doesnotapply kbvs2002sp1sweep kbProperties kbValidation kbTabCtrl kbControl kbbug KB814347 kbAudDeveloper |
---|
|