Author: jpobst
Date: 2007-09-20 12:13:12 -0400 (Thu, 20 Sep 2007)
New Revision: 86071
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
Log:
2007-09-20 Jonathan Pobst <[EMAIL PROTECTED]>
* ComboBox.cs: When there are no items, do not show the dropdown if
the down arrow is clicked. Fixes part of bug #322668.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-09-20 15:57:04 UTC (rev 86070)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-09-20 16:13:12 UTC (rev 86071)
@@ -1,5 +1,10 @@
2007-09-20 Jonathan Pobst <[EMAIL PROTECTED]>
+ * ComboBox.cs: When there are no items, do not show the dropdown if
+ the down arrow is clicked. Fixes part of bug #322668.
+
+2007-09-20 Jonathan Pobst <[EMAIL PROTECTED]>
+
* ToolStripComboBox.cs: Manually set the size of this control in the
constructor, as it doesn't seem to be the same as DefaultSize.
Fixes a failing monobuild test.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
2007-09-20 15:57:04 UTC (rev 86070)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
2007-09-20 16:13:12 UTC (rev 86071)
@@ -1596,7 +1596,13 @@
area = button_area;
if (area.Contains (e.X, e.Y)) {
- DropDownListBox ();
+ if (Items.Count > 0)
+ DropDownListBox ();
+ else {
+ button_state = ButtonState.Pushed;
+ OnDropDown (EventArgs.Empty);
+ }
+
Invalidate (button_area);
Update ();
}
@@ -1618,6 +1624,10 @@
void OnMouseUpCB (object sender, MouseEventArgs e)
{
Capture = false;
+
+ button_state = ButtonState.Normal;
+ Invalidate (button_area);
+
OnClick (EventArgs.Empty);
if (dropped_down)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches