[Mono-bugs] [Bug 82575][Nor] Changed - Form: PreferredSize does not return the correct value

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Aug 27 11:21:45 EDT 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=82575

--- shadow/82575	2007-08-27 11:19:12.000000000 -0400
+++ shadow/82575.tmp.22977	2007-08-27 11:21:45.000000000 -0400
@@ -35,6 +35,37 @@
 I ran your tests and it return 503,503 (test1) and 0,0 (test2) without
 apply the patch, for me looks like it is ok.
 
 
 ------- Additional Comments From everaldo at simios.org  2007-08-27 11:19 -------
 Reopened. On .net it returns different values.
+
+------- Additional Comments From georgegiolfan at yahoo.com  2007-08-27 11:21 -------
+Here is a standalone test.
+
+using System.Diagnostics;
+using System.Drawing;
+using System.Windows.Forms;
+class Test
+{
+	static void Main ()
+	{
+		new TestForm ();
+	}
+}
+
+class TestForm : Form
+{
+	public TestForm ()
+	{
+		AutoSize = true;
+		Control control = new Control ();
+		control.Size = new Size (Width * 2, Height * 2);
+		Controls.Add (control);
+		Size preferred_client_size = new Size (control.Width 
++ control.Margin.Right, control.Height + control.Margin.Bottom);
+		Debug.Assert (PreferredSize == SizeFromClientSize 
+(preferred_client_size));
+		Debug.Assert (SizeFromClientSize 
+(preferred_client_size) != preferred_client_size);
+	}
+}


More information about the mono-bugs mailing list