[Mono-bugs] [Bug 78486][Min] New - ContainerControl should not
receive focus
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue May 23 02:58:13 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 atsushi at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=78486
--- shadow/78486 2006-05-23 02:58:13.000000000 -0400
+++ shadow/78486.tmp.14806 2006-05-23 02:58:13.000000000 -0400
@@ -0,0 +1,66 @@
+Bug#: 78486
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: Windows.Forms
+AssignedTo: peter at novonyx.com
+ReportedBy: atsushi at ximian.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: ContainerControl should not receive focus
+
+The following example demonstrates that either UserControl or Form steals a
+focus from its child Button:
+
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+public class Test : Form
+{
+ public static void Main ()
+ {
+ Application.Run (new Test ());
+ }
+
+ public Test ()
+ {
+ Button b = new Button ();
+ UserControl p = new UserControl ();
+ p.Dock = DockStyle.Top;
+ p.BackColor = Color.Red;
+ p.Controls.Add (b);
+ Controls.Add (p);
+ }
+}
+
+
+Steps to reproduce the problem:
+1. Build and run the above.
+2. Select the button (btw it should not be required since the button should
+have the initial focus).
+3. Click anywhere else on the form than the button.
+
+Actual Results:
+
+The focus on the button is lost.
+
+Expected Results:
+
+The focus should remain on the button.
+
+
+This means that either UserControl or Form should not steal the focus on
+the button.
+
+Both UserControl and Form are derived from ContainerControl.
+
+If you replace UserControl with Panel (derived from ScrollableControl),
+this problem does not happen.
More information about the mono-bugs
mailing list