Author: lpage
Date: 2008-02-15 17:43:58 -0500 (Fri, 15 Feb 2008)
New Revision: 95847
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
Log:
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/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-02-15 22:42:25 UTC (rev 95846)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-02-15 22:43:58 UTC (rev 95847)
@@ -1,4 +1,9 @@
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.
+
+2008-02-15 Luke Page <[EMAIL PROTECTED]>
* TextBoxBase.cs, TextControl.cs, RichTextBox.cs: TextChanged fires
when Undo/Redo changes the text. Undo/Redo/Undo/Redo now works
correctly. See #359330
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
2008-02-15 22:42:25 UTC (rev 95846)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
2008-02-15 22:43:58 UTC (rev 95847)
@@ -1792,6 +1792,16 @@
if (e.Button == MouseButtons.Left) {
+ // Special case when shift key is pressed and
+ // left mouse is clicked.. set selection from
+ // current cursor to mouse
+ if ((Control.ModifierKeys & Keys.Shift) > 0) {
+ document.PositionCaret (e.X +
document.ViewPortX, e.Y + document.ViewPortY);
+ document.SetSelectionToCaret (false);
+ document.DisplayCaret ();
+ return;
+ }
+
dbliclick = IsDoubleClick (e);
if (current_link != null) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches