Quellcode durchsuchen

2008-05-13 Carlos Alberto Cortez <[email protected]>

	* ComboBox.cs: When setting mode to Simple *and* height hasn't been
	set, default height to 150. I tried first with DefaultSize, but this
	is not generating a SetBoundsCore call before handle creation time, so
	we can take it into account. This is just what .net does.


svn path=/trunk/mcs/; revision=103155
Carlos Alberto Cortez vor 17 Jahren
Ursprung
Commit
c1dc0cbfe0

+ 7 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog

@@ -1,3 +1,10 @@
+2008-05-13  Carlos Alberto Cortez <[email protected]>
+
+	* ComboBox.cs: When setting mode to Simple *and* height hasn't been
+	set, default height to 150. I tried first with DefaultSize, but this
+	is not generating a SetBoundsCore call before handle creation time, so
+	we can take it into account. This is just what .net does.
+
 2008-05-13  Jonathan Pobst  <[email protected]>
 
 	* XplatUIX11.cs, X11Keyboard.cs: Had to revert eno's r103060,

+ 6 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs

@@ -402,6 +402,12 @@ namespace System.Windows.Forms
 					CreateComboListBox ();
 					Controls.AddImplicit (listbox_ctrl);
 					listbox_ctrl.Visible = true;
+
+					// This should give us a 150 default height
+					// for Simple mode if size hasn't been set
+					// (DefaultSize doesn't work for us in this case)
+					if (requested_height == -1)
+						requested_height = 150;
 				} else {
 					show_dropdown_button = true;
 					button_state = ButtonState.Normal;