[Mono-bugs] [Bug 80747][Nor] New - ToolStripMenuItem show not show its DropDown when it is not enabled

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Feb 7 05:43:58 EST 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by georgegiolfan at yahoo.com.

http://bugzilla.ximian.com/show_bug.cgi?id=80747

--- shadow/80747	2007-02-07 05:43:58.000000000 -0500
+++ shadow/80747.tmp.18187	2007-02-07 05:43:58.000000000 -0500
@@ -0,0 +1,54 @@
+Bug#: 80747
+Product: Mono: Class Libraries
+Version: 1.2
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: georgegiolfan at yahoo.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: ToolStripMenuItem show not show its DropDown when it is not enabled
+
+Description of Problem:
+Clicking on a disabled menu item displays its submenu.
+
+Steps to reproduce the problem:
+1. Compile and run the following program.
+using System.Windows.Forms;
+class TestForm : Form {
+    static void Main() {
+        Application.Run(new TestForm());
+    }
+    public TestForm() {
+        ToolStripMenuItem i = new ToolStripMenuItem("Menu");
+        i.Enabled = false;
+        i.DropDown.Items.Add("Submenu");
+        MainMenuStrip = new MenuStrip();
+        MainMenuStrip.Items.Add(i);
+        Controls.Add(MainMenuStrip);
+    }
+}
+2. Click on "Menu".
+
+Actual Results:
+"Submenu" is displayed.
+
+Expected Results:
+Nothing.
+
+How often does this happen? 
+Always (on the SVN version).
+
+Additional Information:
+Changing
+			if (this.HasDropDownItems)
+to
+			if (this.HasDropDownItems && Enabled)
+in ToolStripMenuItem.OnMouseDown seems to fix it.


More information about the mono-bugs mailing list