[Mono-bugs] [Bug 79781][Nor] New - Control.TopLevelControl never returns null

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Oct 29 16:44:53 EST 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 alex.olk at googlemail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=79781

--- shadow/79781	2006-10-29 16:44:53.000000000 -0500
+++ shadow/79781.tmp.22604	2006-10-29 16:44:53.000000000 -0500
@@ -0,0 +1,55 @@
+Bug#: 79781
+Product: Mono: Class Libraries
+Version: 1.0
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: alex.olk at googlemail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Control.TopLevelControl never returns null
+
+On Windows Control.TopLevelControl returns null for Controls that are not
+added to any form, aka Controls.Add(bla).
+
+mwf always returns the parent control or the control itself.
+
+Attached is a simple testcase that gives the following results (first
+windows and ms.net, then linux and mono):
+
+----- snip win output -----
+System.Windows.Forms.TabControl tb  -> TopLevelControl: ""
+System.Windows.Forms.TabControl tb TopLevelControl is null
+
+System.Windows.Forms.TabPage tp1  -> TopLevelControl: ""
+System.Windows.Forms.TabPage tp1 TopLevelControl is null
+
+System.Windows.Forms.Button button1  -> TopLevelControl:
+"TopLevel.MainForm, Text: MainForm"
+
+TopLevel.MainForm MainForm  -> TopLevelControl: "TopLevel.MainForm, Text:
+MainForm"
+----- snip -----
+
+----- snip linux aka mono output -----
+System.Windows.Forms.TabControl tb  -> TopLevelControl:
+"System.Windows.Forms.TabControl, TabPages.Count: 1, TabPages[0]: TabPage:
+{Test}"
+
+System.Windows.Forms.TabPage tp1  -> TopLevelControl:
+"System.Windows.Forms.TabControl, TabPages.Count: 1, TabPages[0]: TabPage:
+{Test}"
+
+System.Windows.Forms.Button button1  -> TopLevelControl:
+"TopLevel.MainForm, Text: MainForm"
+
+TopLevel.MainForm MainForm  -> TopLevelControl: "TopLevel.MainForm, Text:
+MainForm"
+----- snip win output -----


More information about the mono-bugs mailing list