[Mono-bugs] [Bug 80917][Nor] New - Controls with DisplayRectangle returning values different from ClientRectangle do not lay out their children properly
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Feb 20 21:31:28 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=80917
--- shadow/80917 2007-02-20 21:31:28.000000000 -0500
+++ shadow/80917.tmp.31882 2007-02-20 21:31:28.000000000 -0500
@@ -0,0 +1,48 @@
+Bug#: 80917
+Product: Mono: Class Libraries
+Version: 1.2
+OS: other
+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: Controls with DisplayRectangle returning values different from ClientRectangle do not lay out their children properly
+
+Steps to reproduce the problem:
+Compile and run the following program.
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+class TestForm : Form {
+ static void Main() {
+ Application.Run(new TestForm());
+ }
+ public TestForm() {
+ Control c = new Control();
+ c.Anchor |= AnchorStyles.Bottom;
+ c.Size = new Size(100, 100);
+ Controls.Add(c);
+ Debug.Assert(c.Height == 100);
+ }
+ public override Rectangle DisplayRectangle {
+ get {
+ return Rectangle.Empty;
+ }
+ }
+}
+
+How often does this happen?
+Always (on the SVN version).
+
+Additional Information:
+Bug 80863 is probably an instance of this one.
+Using ClientRectangle instead of DisplayRectangle in DefaultLayout (the
+"space = parent.DisplayRectangle" lines) seems to fix it.
More information about the mono-bugs
mailing list