[Mono-bugs] [Bug 80336][Nor] New - Control.Anchor, SuspendLayout problem.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Dec 21 13:41:08 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 georgegiolfan at yahoo.com.

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

--- shadow/80336	2006-12-21 13:41:08.000000000 -0500
+++ shadow/80336.tmp.9641	2006-12-21 13:41:08.000000000 -0500
@@ -0,0 +1,38 @@
+Bug#: 80336
+Product: Mono: Class Libraries
+Version: 1.2
+OS: Windows XP
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: georgegiolfan at yahoo.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Control.Anchor, SuspendLayout problem.
+
+This behaves differently on Microsoft .NET Framework. It is probably 
+because SuspendLayout does not actually suspend layout. It only improves 
+performance, probably by suppressing native calls.
+
+using System.Drawing;
+using System.Windows.Forms;
+class TestForm : Form {
+    static void Main() {
+        Application.Run(new TestForm());
+    }
+    public TestForm() {
+        SuspendLayout();
+        Button b = new Button();
+        Controls.Add(b);
+        ClientSize = b.Size;
+        b.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
+        Size = new Size(300, 300);
+        ResumeLayout();
+    }
+}


More information about the mono-bugs mailing list