[Mono-bugs] [Bug 76682][Nor] New - TreeView.Clear() disables click
events
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sat Nov 12 10:34:50 EST 2005
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=76682
--- shadow/76682 2005-11-12 10:34:50.000000000 -0500
+++ shadow/76682.tmp.32008 2005-11-12 10:34:50.000000000 -0500
@@ -0,0 +1,66 @@
+Bug#: 76682
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: peter at novonyx.com
+ReportedBy: atsushi at ximian.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: TreeView.Clear() disables click events
+
+After TreeView.Clear(), click events (including non-user ones) are disabled.
+
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+public class TestForm : Form
+{
+ public static void Main ()
+ {
+ Application.Run (new TestForm ());
+ }
+
+ TreeView tv = new TreeView ();
+
+ public TestForm ()
+ {
+ tv.Nodes.Add (new TreeNode ("node"));
+ tv.Nodes [0].Nodes.Add (new TreeNode ("child"));
+ Controls.Add (tv);
+ Click += new EventHandler (ResetTree);
+ }
+
+ void ResetTree (object o, EventArgs e)
+ {
+ tv.Nodes.Clear ();
+ tv.Nodes.Add (new TreeNode ("node-reset"));
+ tv.Nodes [0].Nodes.Add (new TreeNode ("child"));
+
+ // This will easily tell you what is happening here.
+ tv.ExpandAll ();
+ }
+}
+
+
+Steps to reproduce the problem:
+1. compile above and run.
+2. click the non-treeview area of the form.
+3. click tree expansion toggle ([+] or [-]).
+
+How often does this happen?
+
+consistently.
+
+Additional Information:
+
+ExpandAll() in the source code is not required to reproduce the bug. It
+just tells you that the TreeView no longer changes its focus.
More information about the mono-bugs
mailing list