[Mono-bugs] [Bug 82577][Nor] New - TreeView: Endless loop calling CancelEdit and BeginEdit
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Aug 24 13:23:57 EDT 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 gert.driesen at pandora.be.
http://bugzilla.ximian.com/show_bug.cgi?id=82577
--- shadow/82577 2007-08-24 13:23:57.000000000 -0400
+++ shadow/82577.tmp.20278 2007-08-24 13:23:57.000000000 -0400
@@ -0,0 +1,37 @@
+Bug#: 82577
+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: gert.driesen at pandora.be
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: TreeView: Endless loop calling CancelEdit and BeginEdit
+
+To refuse changes made to the label of a TreeNode and keep the label
+editable, you can use the following eventhandler:
+
+void TreeView_AfterLabelEdit (object sender, NodeLabelEditEventArgs e)
+{
+ if (e.Label == null)
+ return;
+
+ if (e.Label == "REFUSE") {
+ e.CancelEdit = true;
+ e.Node.BeginEdit ();
+ }
+}
+
+However, on Mono this results in an endless loop and eventually a crash.
+
+To reproduce:
+1. compile and run the attached source code.
+2. follow the on-screen instructions.
More information about the mono-bugs
mailing list