Author: jpobst
Date: 2008-02-20 12:02:50 -0500 (Wed, 20 Feb 2008)
New Revision: 96271

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SplitContainer.cs
   trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
   
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SplitContainerTests.cs
Log:


Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2008-02-20 16:45:19 UTC (rev 96270)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2008-02-20 17:02:50 UTC (rev 96271)
@@ -1,5 +1,11 @@
 2008-02-20  Jonathan Pobst  <[EMAIL PROTECTED]>
 
+       * SplitContainer.cs: Add SupportsTransparentBackColor and
+       OptimizedDoubleBuffering control styles.
+       [Fixes bug #363303]
+
+2008-02-20  Jonathan Pobst  <[EMAIL PROTECTED]>
+
        * Application.cs: For the app data paths and the registry key paths,
        ensure they are created before returning them to the user.
        [Fixes bug #361709]

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SplitContainer.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SplitContainer.cs    
    2008-02-20 16:45:19 UTC (rev 96270)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SplitContainer.cs    
    2008-02-20 17:02:50 UTC (rev 96271)
@@ -133,6 +133,9 @@
                #region Public Constructors
                public SplitContainer ()
                {
+                       SetStyle (ControlStyles.SupportsTransparentBackColor, 
true);
+                       SetStyle (ControlStyles.OptimizedDoubleBuffer, true);
+                       
                        fixed_panel = FixedPanel.None;
                        orientation = Orientation.Vertical;
 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2008-02-20 16:45:19 UTC (rev 96270)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2008-02-20 17:02:50 UTC (rev 96271)
@@ -1,3 +1,7 @@
+2008-02-20  Jonathan Pobst  <[EMAIL PROTECTED]>
+
+       * SplitContainerTests.cs: Add test for bug #363303.
+
 2008-02-19  Jonathan Pobst  <[EMAIL PROTECTED]>
 
        * SelectionRangeTest.cs: Add NET_2_0 so that 1.1 profile will build.

Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SplitContainerTests.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SplitContainerTests.cs
      2008-02-20 16:45:19 UTC (rev 96270)
+++ 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SplitContainerTests.cs
      2008-02-20 17:02:50 UTC (rev 96271)
@@ -272,12 +272,40 @@
                        f.Dispose ();
                }
 
+               [Test]
+               public void ControlStyle ()
+               {
+                       PublicSplitContainer epp = new PublicSplitContainer ();
+
+                       ControlStyles cs = ControlStyles.ContainerControl;
+                       cs |= ControlStyles.UserPaint;
+                       cs |= ControlStyles.StandardClick;
+                       cs |= ControlStyles.SupportsTransparentBackColor;
+                       cs |= ControlStyles.StandardDoubleClick;
+                       cs |= ControlStyles.Selectable;
+                       cs |= ControlStyles.OptimizedDoubleBuffer;
+                       cs |= ControlStyles.UseTextForAccessibility;
+
+                       Assert.AreEqual (cs, epp.GetControlStyles (), "Styles");
+               }
+
                private class PublicSplitContainer : SplitContainer
                {
                        public void PublicScaleControl (SizeF factor, 
BoundsSpecified specified)
                        {
                                base.ScaleControl (factor, specified);
                        }
+
+                       public ControlStyles GetControlStyles ()
+                       {
+                               ControlStyles retval = (ControlStyles)0;
+
+                               foreach (ControlStyles cs in Enum.GetValues 
(typeof (ControlStyles)))
+                                       if (this.GetStyle (cs) == true)
+                                               retval |= cs;
+
+                               return retval;
+                       }
                }
        }
 }

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

Reply via email to