[Mono-bugs] [Bug 80777][Nor] Changed - Sorted TreeView problems with inherited TreeNodes

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Feb 9 18:17:46 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 levap at bansky.net.


--- shadow/80777	2007-02-09 18:16:47.000000000 -0500
+++ shadow/80777.tmp.4979	2007-02-09 18:17:46.000000000 -0500
@@ -1,23 +1,23 @@
 Bug#: 80777
 Product: Mono: Class Libraries
 Version: 1.2
+OS: unknown
 OS Details: Windows XP SP 2 Czech
 Status: NEW   
 Severity: 320 Two months
 Priority: Normal
 Component: Windows.Forms
 AssignedTo: toshok at ximian.com                            
 ReportedBy: levap at bansky.net               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
-Summary: Cast of TreeNode workis in MS.NET not on Mono
+Summary: Sorted TreeView problems with inherited TreeNodes
 Description of Problem:
 Following error occurs  "System.InvalidCastException: Cannot cast from
 source type to destination type."  When casting like this 
@@ -59,6 +59,16 @@
 IntPtr wParam, IntPtr lParam) [0x00000]
 ------- Additional Comments From levap at bansky.net  2007-02-09 18:16 -------
 Created an attachment (id=18657)
 Source code reproducing the bug 80777
+------- Additional Comments From levap at bansky.net  2007-02-09 18:17 -------
+I found the roots of the problem. Problem occurs when TreeView.Sorted
+property is set to True. First node of the tree node which is in fact
+invisible has it's Text property set to 'ROOT NODE'.
+This 'invisible' root node is TreeNode type, so that is imposible to
+cast it into the MyTreeNode.
+Attached source file reproduces the problem.

More information about the mono-bugs mailing list