- Now Redraws on MouseUp for FlatStyle Flat and Popup
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / ButtonBase.cs
index 1eb64750fa8927ec33d2dc10dda54fd2f5799378..7c9e20fd7a1afe3fa6baca6e611ca437de5eb87a 100644 (file)
 //     Peter Bartok    pbartok@novell.com
 //
 // $Log: ButtonBase.cs,v $
+// Revision 1.12  2004/10/13 22:32:38  pbartok
+// - Now Redraws on MouseUp for FlatStyle Flat and Popup
+//
+// Revision 1.11  2004/10/13 20:12:47  pbartok
+// - Added the Redraw on Resize that got dropped in the last rev
+//
 // Revision 1.10  2004/10/05 04:56:11  jackson
 // Let the base Control handle the buffers, derived classes should not have to CreateBuffers themselves.
 //
@@ -158,6 +164,9 @@ namespace System.Windows.Forms {
                        ForeColorChanged+=new EventHandler(RedrawEvent);
                        BackColorChanged+=new System.EventHandler(RedrawEvent);
                        FontChanged+=new EventHandler(RedrawEvent);
+                       SizeChanged+=new EventHandler(RedrawEvent);
+
+                       SetStyle (ControlStyles.ResizeRedraw, true);
                }
                #endregion      // Public Constructors
 
@@ -454,6 +463,8 @@ namespace System.Windows.Forms {
                                if (is_pressed) {
                                        is_pressed = false;
                                        Redraw();
+                               } else if ((this.flat_style == FlatStyle.Flat) || (this.flat_style == FlatStyle.Popup)) {
+                                       Redraw();
                                }
 
                                if (mevent.X>=0 && mevent.Y>=0 && mevent.X<this.client_size.Width && mevent.Y<=this.client_size.Height) {