Author: lpage
Date: 2008-02-15 18:33:55 -0500 (Fri, 15 Feb 2008)
New Revision: 95850
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MaskedTextBox.cs
Log:
2008-02-15 Luke Page <[EMAIL PROTECTED]>
* MaskedTextBox.cs: Now skips non editable characters after a
character has been entered and we are progressing to the next
position in the MaskedTextBox.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-02-15 23:32:21 UTC (rev 95849)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-02-15 23:33:55 UTC (rev 95850)
@@ -1,4 +1,9 @@
2008-02-15 Luke Page <[EMAIL PROTECTED]>
+ * MaskedTextBox.cs: Now skips non editable characters after a
+ character has been entered and we are progressing to the next
+ position in the MaskedTextBox.
+
+2008-02-15 Luke Page <[EMAIL PROTECTED]>
* TextBoxBase.cs: Handles MouseDown when shift key is clicked so
that it changes the selection rather than just repositioning the
cursor. Fixes Bug #360873.
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MaskedTextBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MaskedTextBox.cs
2008-02-15 23:32:21 UTC (rev 95849)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MaskedTextBox.cs
2008-02-15 23:33:55 UTC (rev 95850)
@@ -246,7 +246,14 @@
if (!result) {
OnMaskInputRejected (new
MaskInputRejectedEventArgs (testPosition, resultHint));
} else {
- SelectionStart++;
+ int iIndex = provider.FindEditPositionFrom
(SelectionStart+1, true);
+
+ if (iIndex != MaskedTextProvider.InvalidIndex) {
+ SelectionStart = iIndex;
+ } else {
+ SelectionStart = provider.Length;
+ }
+
UpdateVisibleText ();
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches