Author: jordi
Date: 2005-06-22 12:38:51 -0400 (Wed, 22 Jun 2005)
New Revision: 46372
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollBar.cs
Log:
2005-06-22 Jordi Mas i Hernandez <[EMAIL PROTECTED]>
* ScrollBar.cs: Fixes thumbpos on Maximum values
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2005-06-22 15:52:25 UTC (rev 46371)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2005-06-22 16:38:51 UTC (rev 46372)
@@ -1,3 +1,7 @@
+2005-06-22 Jordi Mas i Hernandez <[EMAIL PROTECTED]>
+
+ * ScrollBar.cs: Fixes thumbpos on Maximum values
+
2005-06-21 Jonathan Chambers <[EMAIL PROTECTED]>
* PropertyGridView.cs: Pass context information to UITypeEditors
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollBar.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollBar.cs
2005-06-22 15:52:25 UTC (rev 46371)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollBar.cs
2005-06-22 16:38:51 UTC (rev 46372)
@@ -411,7 +411,11 @@
OnValueChanged (EventArgs.Empty);
ClearDirty ();
- UpdatePos (Value, true);
+
+ if (IsHandleCreated) {
+ UpdateThumbPos (thumb_area.Y +
(int)(((float)(position - minimum)) * pixel_per_pos), false);
+ }
+
InvalidateDirty ();
}
}
@@ -438,8 +442,8 @@
base.OnHandleCreated (e);
CalcButtonSizes ();
- CalcThumbArea ();
- UpdatePos (Value, true);
+ CalcThumbArea ();
+ UpdateThumbPos (thumb_area.Y + (int)(((float)(position
- minimum)) * pixel_per_pos), false);
}
protected virtual void OnScroll (ScrollEventArgs event_args)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches