[Mono-bugs] [Bug 80456][Min] New - OnLayout behaviour

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jan 5 01:39:02 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 georgegiolfan at yahoo.com.

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

--- shadow/80456	2007-01-05 01:39:02.000000000 -0500
+++ shadow/80456.tmp.10230	2007-01-05 01:39:02.000000000 -0500
@@ -0,0 +1,48 @@
+Bug#: 80456
+Product: Mono: Class Libraries
+Version: 1.2
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: georgegiolfan at yahoo.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: OnLayout behaviour
+
+Contrary to what I expected, this program should NOT print the message.
+using System;
+using System.Windows.Forms;
+using System.Windows.Forms.Layout;
+class TestForm : Control {
+    static void Main() {
+        new TestForm();
+    }
+    public TestForm() {
+        ShowMessage = true;
+        PerformLayout();
+        ShowMessage = false;
+    }
+    protected override void OnLayout(LayoutEventArgs levent) {
+    }
+    public override LayoutEngine LayoutEngine {
+        get {
+            return new MyLayoutEngine();
+        }
+    }
+    static bool ShowMessage;
+    class MyLayoutEngine : LayoutEngine {
+        public override bool Layout(object container, LayoutEventArgs 
+args) {
+            if (ShowMessage)
+                Console.WriteLine("Layout");
+            return true;
+        }
+    }
+}


More information about the mono-bugs mailing list