2008-05-19 Carlos Alberto Cortez <calberto.cortez@gmail.com>
authorCarlos Alberto Cortez <calberto.cortez@gmail.com>
Mon, 19 May 2008 22:29:54 +0000 (22:29 -0000)
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>
Mon, 19 May 2008 22:29:54 +0000 (22:29 -0000)
* TabControl.cs: Don't paint by ourselved and instead let OnPaint
being fired if ControlStyles.UserPaint style is activated.
Fixes #371905.

svn path=/trunk/mcs/; revision=103524

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs

index 16e2b9977eb34b355c89f917a13fbef5a7b3f7f0..5ae884f0cc06bb6edfa810e61e64c6fafab063cd 100644 (file)
@@ -1,3 +1,9 @@
+2008-05-19  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * TabControl.cs: Don't paint by ourselved and instead let OnPaint
+       being fired if ControlStyles.UserPaint style is activated.
+       Fixes #371905.
+
 2008-05-19  Ivan N. Zlatev  <contact@i-nz.net>
 
        * GridEntry.cs: Don't be so strict when setting the value - 
index 631955a0fa607b2f690e3517678767a178ead48e..1e2e8371ce6fc099368b9a0b98f807979bd63661 100644 (file)
@@ -627,6 +627,9 @@ namespace System.Windows.Forms {
 
                internal override void OnPaintInternal (PaintEventArgs pe)
                {
+                       if (GetStyle (ControlStyles.UserPaint))
+                               return;
+
                        Draw (pe.Graphics, pe.ClipRectangle);
                        pe.Handled = true;
                }