[Mono-bugs] [Bug 82598][Min] New - TreeView: Left-arrow key to collapse leaf node ignored often
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sun Aug 26 06:05:35 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 andyhume32 at yahoo.co.uk.
http://bugzilla.ximian.com/show_bug.cgi?id=82598
--- shadow/82598 2007-08-26 06:05:35.000000000 -0400
+++ shadow/82598.tmp.31455 2007-08-26 06:05:35.000000000 -0400
@@ -0,0 +1,51 @@
+Bug#: 82598
+Product: Mono: Class Libraries
+Version: 1.2
+OS:
+OS Details: XP SP2
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com
+ReportedBy: andyhume32 at yahoo.co.uk
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: TreeView: Left-arrow key to collapse leaf node ignored often
+
+In some cases using the left-arrow key to close a node in TreeView is
+ignored and the node stays open. This happens for leaf nodes in some
+situations. Found on WinXP, SVN head, also repro'd on 1.2.4-release.
+Repro'd also on Linux Mono 1.2.4.
+
+I added some printf-debugging to TreeView.OnKeyDown:
+ ...
+ case Keys.Left:
+ Console.WriteLine("Keys.Left: Nodes.Count: {0}",
+selected_node.Nodes.Count);
+ if (selected_node != null) {
+ if (selected_node.IsExpanded) {
+ Console.WriteLine(" IsExpanded ((is_expanded: {0}))",
+selected_node.is_expanded);
+ selected_node.Collapse();
+ Console.WriteLine(" ((after--is_expanded: {0}, IsExpanded:
+{1}))", selected_node.is_expanded, selected_node.IsExpanded);
+ } else {
+ ...
+
+When I reproduce the bug I see:
+Keys.Left: Nodes.Count: 0
+ IsExpanded ((is_expanded: True))
+ ((after--is_expanded: True, IsExpanded: True))
+
+Yikes! An expanded leaf-node (a contradiction in itself!?) is never
+collapsed. :-(
+
+I initially discovered this in FolderBrowserDialog where the problem was
+only reproducable in some cases, however with the code from bug #81423
+repro #2 it seems to always occur. In FolderBrowserDialog one way of
+enhancing the chances of hitting it, it to right-arrow expand a leaf node
+(!).
More information about the mono-bugs
mailing list