Author: everaldo
Date: 2007-05-11 10:46:48 -0400 (Fri, 11 May 2007)
New Revision: 77241
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
Log:
* ToolBar.cs: Fix autosize and get it working only after hadle is
created,
also prevent redraw in set_autosize if handle is not created. Fixes
#81523.
2007-05-11 Everaldo Canuto <[EMAIL PROTECTED]>
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-05-11 13:15:28 UTC (rev 77240)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-05-11 14:46:48 UTC (rev 77241)
@@ -1,5 +1,10 @@
2007-05-11 Everaldo Canuto <[EMAIL PROTECTED]>
+ * ToolBar.cs: Fix autosize and get it working only after hadle is
created,
+ also prevent redraw in set_autosize if handle is not created. Fixes
#81523.
+
+2007-05-11 Everaldo Canuto <[EMAIL PROTECTED]>
+
* ToolBar.cs: Adjust size to default size when button theres no text and
image, it fixes remaining issues from #81524.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
2007-05-11 13:15:28 UTC (rev 77240)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
2007-05-11 14:46:48 UTC (rev 77241)
@@ -184,7 +184,9 @@
return;
autosize = value;
- Redraw (true);
+
+ if (IsHandleCreated)
+ Redraw (true);
}
}
@@ -1003,12 +1005,12 @@
if (Wrappable)
calculated_size += Vertical ? x : y;
- if (Vertical)
- if (requested_size >= 0)
- SetBounds (Bounds.X, Bounds.Y, AutoSize
? calculated_size : requested_size, Width, BoundsSpecified.None);
- else
- if (requested_size >= 0)
- SetBounds (Bounds.X, Bounds.Y, Height,
AutoSize ? calculated_size : requested_size, BoundsSpecified.None);
+ if (IsHandleCreated) {
+ if (Vertical)
+ Width = calculated_size;
+ else
+ Height = calculated_size;
+ }
return changed;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches