Author: jackson
Date: 2006-12-11 16:31:30 -0500 (Mon, 11 Dec 2006)
New Revision: 69366

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

        * TextBoxBase.cs: We need to cap this value, since Maximum -
        ViewPortHeight can be less than zero.



Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs   
2006-12-11 21:18:31 UTC (rev 69365)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs   
2006-12-11 21:31:30 UTC (rev 69366)
@@ -1597,7 +1597,8 @@
                        }
 
                        if (e.Delta < 0)
-                               vscroll.Value = Math.Min (vscroll.Value + 
SystemInformation.MouseWheelScrollLines, vscroll.Maximum - 
document.ViewPortHeight + 1);
+                               vscroll.Value = Math.Min (vscroll.Value + 
SystemInformation.MouseWheelScrollLines,
+                                               Math.Max (0, vscroll.Maximum - 
document.ViewPortHeight + 1));
                        else
                                vscroll.Value = Math.Max (0, vscroll.Value - 
SystemInformation.MouseWheelScrollLines);
                }

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

Reply via email to