Author: jackson
Date: 2006-11-08 15:16:18 -0500 (Wed, 08 Nov 2006)
New Revision: 67550

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
Log:

        - Make sure to set the cursor position when there is a click,
        otherwise two clicks in separate areas could cause a large chunk
        to be selected.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-08 20:05:17 UTC (rev 67549)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-08 20:16:18 UTC (rev 67550)
@@ -3,6 +3,9 @@
        * TextControl.cs: When combining lines carry over the line end
        style from the end line.
        * TextBoxBase.cs: Only rich text box can do full line selects.
+       - Make sure to set the cursor position when there is a click,
+       otherwise two clicks in separate areas could cause a large chunk
+       to be selected.
 
 2006-11-07  Everaldo Canuto  <[EMAIL PROTECTED]>
 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs   
2006-11-08 20:05:17 UTC (rev 67549)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs   
2006-11-08 20:16:18 UTC (rev 67550)
@@ -1411,7 +1411,7 @@
 
                                interval = DateTime.Now - click_last;
                                document.PositionCaret(e.X + 
document.ViewPortX, e.Y + document.ViewPortY);
-                               
+
                                // Handle place caret/select word/select line 
behaviour
                                if (e.Clicks == 1) {
                                        if (SystemInformation.DoubleClickTime < 
interval.TotalMilliseconds) {
@@ -1426,6 +1426,9 @@
                                                #endif
                                                
document.ExpandSelection(CaretSelection.Line, false);
                                                click_mode = 
CaretSelection.Line;
+                                       } else {
+                                               
document.SetSelectionToCaret(true);
+                                               click_mode = 
CaretSelection.Position;
                                        }
                                } else {
                                        // We select the line if the word is 
already selected, and vice versa

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to