[Mono-bugs] [Bug 80495][Nor] New - Button with DialogResult set to OK should work even if it's not directly on a form
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Jan 10 22:10:51 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=80495
--- shadow/80495 2007-01-10 22:10:51.000000000 -0500
+++ shadow/80495.tmp.14124 2007-01-10 22:10:51.000000000 -0500
@@ -0,0 +1,49 @@
+Bug#: 80495
+Product: Mono: Class Libraries
+Version: 1.2
+OS: All
+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: Button with DialogResult set to OK should work even if it's not directly on a form
+
+Description of Problem:
+Button with DialogResult set to OK should work even if it's not directly
+on a form.
+
+Steps to reproduce the problem:
+1. Compile and run the following program.
+using System.Windows.Forms;
+class TestForm : Form {
+ static void Main() {
+ MessageBox.Show((new TestForm().ShowDialog() ==
+DialogResult.OK).ToString());
+ }
+ public TestForm() {
+ Control c = new Control();
+ Button b = new Button();
+ c.Size = b.Size;
+ c.Controls.Add(b);
+ b.DialogResult = DialogResult.OK;
+ Controls.Add(c);
+ }
+}
+2. Click on the button.
+
+Actual Results:
+Nothing happens. After closing the form, MessageBox shows false.
+
+Expected Results:
+MessageBox showing true.
+
+How often does this happen?
+Always (on SVN version).
More information about the mono-bugs
mailing list