Author: jackson
Date: 2006-11-06 14:08:07 -0500 (Mon, 06 Nov 2006)
New Revision: 67412

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

        * TreeView.cs: Can't use the VisibleCount property when setting
        scrollbar heights, because this doesn't take into account
whether
        or not the horz scrollbar just came visible.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-06 18:11:52 UTC (rev 67411)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-06 19:08:07 UTC (rev 67412)
@@ -1,3 +1,9 @@
+2006-11-06  Jackson Harper  <[EMAIL PROTECTED]>
+
+       * TreeView.cs: Can't use the VisibleCount property when setting
+       scrollbar heights, because this doesn't take into account whether
+       or not the horz scrollbar just came visible.
+
 2006-11-05  Everaldo Canuto  <[EMAIL PROTECTED]>
 
        * MenuAPI.cs: Deactivate menu on mouse up when menus it is already

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs      
2006-11-06 18:11:52 UTC (rev 67411)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs      
2006-11-06 19:08:07 UTC (rev 67412)
@@ -1330,7 +1330,8 @@
                        }
 
                        if (vert) {
-                               vbar.SetValues (Math.Max (0, max_visible_order 
- 2), VisibleCount);
+                               int visible_height = horz ? 
ClientRectangle.Height - hbar.Height : ClientRectangle.Height;
+                               vbar.SetValues (Math.Max (0, max_visible_order 
- 2), visible_height / ItemHeight);
                                /*
                                vbar.Maximum = max_visible_order;
                                vbar.LargeChange = ClientRectangle.Height / 
ItemHeight;

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

Reply via email to