Author: marek
Date: 2007-04-26 19:11:08 -0400 (Thu, 26 Apr 2007)
New Revision: 76361

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
Log:
2007-04-26  Marek Safar  <[EMAIL PROTECTED]>

        * TextBoxBase.cs (CaretMoved): Consider scroll maximum when scroll
        value is set.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-04-26 22:53:08 UTC (rev 76360)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-04-26 23:11:08 UTC (rev 76361)
@@ -1,3 +1,8 @@
+2007-04-26  Marek Safar  <[EMAIL PROTECTED]>
+
+       * TextBoxBase.cs (CaretMoved): Consider scroll maximum when scroll
+       value is set.
+
 2007-04-26  Alan McGovern <[EMAIL PROTECTED]>
 
        * ListView.cs: Added three missing 2.0 events and corresponding

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs   
2007-04-26 22:53:08 UTC (rev 76360)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs   
2007-04-26 23:11:08 UTC (rev 76361)
@@ -4,7 +4,7 @@
 // without limitation the rights to use, copy, modify, merge, publish,
 // distribute, sublicense, and/or sell copies of the Software, and to
 // permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
+// the following conditions:c
 //
 // The above copyright notice and this permission notice shall be
 // included in all copies or substantial portions of the Software.
@@ -1928,7 +1928,7 @@
                        }
 
                        if ((pos.Y + height) > (document.ViewPortY + 
canvas_height)) {
-                               vscroll.Value = Math.Max (0, pos.Y - 
canvas_height + height);
+                               vscroll.Value = Math.Min (vscroll.Maximum, 
pos.Y - canvas_height + height);
                        }
                }
 

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

Reply via email to