Author: jpobst
Date: 2008-02-19 10:17:31 -0500 (Tue, 19 Feb 2008)
New Revision: 96152

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
   trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
   
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs
Log:
2008-02-19  Jonathan Pobst  <[EMAIL PROTECTED]>

        * ComboBox.cs: Set height to preferred height when the handle
        is created.  [Fixes bug #360862]

2008-02-19  Jonathan Pobst  <[EMAIL PROTECTED]> 

        * ComboBoxTest.cs: Add test for bug #360862.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2008-02-19 15:05:27 UTC (rev 96151)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2008-02-19 15:17:31 UTC (rev 96152)
@@ -1,3 +1,8 @@
+2008-02-19  Jonathan Pobst  <[EMAIL PROTECTED]>
+
+       * ComboBox.cs: Set height to preferred height when the handle
+       is created.  [Fixes bug #360862]
+
 2008-02-18  Andreia Gaita <[EMAIL PROTECTED]>
 
        * XplatUIX11.cs: Create FosterParent with border width at 0.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs      
2008-02-19 15:05:27 UTC (rev 96151)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs      
2008-02-19 15:17:31 UTC (rev 96152)
@@ -809,6 +809,8 @@
                protected override void CreateHandle ()
                {
                        base.CreateHandle ();
+                       
+                       SetBounds (Left, Top, Width, PreferredHeight, 
BoundsSpecified.None);
                }
 #endif
 

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-19 15:05:27 UTC (rev 96151)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2008-02-19 15:17:31 UTC (rev 96152)
@@ -1,6 +1,6 @@
-2008-02-18  Andreia Gaita <[EMAIL PROTECTED]> 
+2008-02-19  Jonathan Pobst  <[EMAIL PROTECTED]> 
 
-       
+       * ComboBoxTest.cs: Add test for bug #360862.
 
 2008-02-18  Andreia Gaita <[EMAIL PROTECTED]>
 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs 
    2008-02-19 15:05:27 UTC (rev 96151)
+++ 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs 
    2008-02-19 15:17:31 UTC (rev 96152)
@@ -1136,6 +1136,19 @@
                        Assert.AreEqual (-1, cmbbox.SelectedIndex, "#S3");
                }
 
+               [Test]  // bug 360862
+               public void SizeChangesAtCreateHandle ()
+               {
+                       ComboBox cb = new ComboBox ();
+                       cb.Font = new Font ("Arial", 18f);
+                       
+                       int original = cb.Height;
+                       
+                       IntPtr h = cb.Handle;
+                       
+                       Assert.IsTrue (cb.Height > original, "ComboBox height 
should be bigger than original");
+               }
+               
 #if NET_2_0
                [Test]
                public void BehaviorAutoSize ()

_______________________________________________
Mono-patches maillist  -  Mono-patches@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to