[Mono-bugs] [Bug 79534][Nor] New - Cannot "click" a Button with the Enter key

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Sep 30 08:15:01 EDT 2006


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 kuba.brecka at gmail.com.

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

--- shadow/79534	2006-09-30 08:15:01.000000000 -0400
+++ shadow/79534.tmp.30276	2006-09-30 08:15:01.000000000 -0400
@@ -0,0 +1,50 @@
+Bug#: 79534
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: Windows XP SP1
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: kuba.brecka at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Cannot "click" a Button with the Enter key
+
+In mono 1.1.17.1, Windows XP SP1, you can't "click" a button by hitting
+Enter on the keyboard. Run the following sample code, press Enter, a
+messagebox show show up. It does under MS.NET, but doesn't under Mono. I
+don't know if this bug exist only on Windows, haven't tested under Linux.
+
+Reproduce code:
+
+using System;
+using System.Windows.Forms;
+
+namespace MonoTest29
+{
+    public class Form1 : Form
+    {
+        static void Main()
+        {
+            Application.Run(new Form1());
+        }
+
+        public Form1()
+        {
+            Button B = new Button();
+            B.Click += new EventHandler(B_Click);
+            Controls.Add(B);
+        }
+
+        void B_Click(object sender, EventArgs e)
+        {
+            MessageBox.Show("Test");
+        }
+    }
+}


More information about the mono-bugs mailing list