[Mono-bugs] [Bug 82537][Nor] New - FlowLayoutPanel.PreferredSize does not return the correct size

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Aug 22 17:35:08 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=82537

--- shadow/82537	2007-08-22 17:35:08.000000000 -0400
+++ shadow/82537.tmp.23310	2007-08-22 17:35:08.000000000 -0400
@@ -0,0 +1,47 @@
+Bug#: 82537
+Product: Mono: Class Libraries
+Version: 1.2
+OS: All
+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: FlowLayoutPanel.PreferredSize does not return the correct size
+
+Description of Problem:
+FlowLayoutPanel.PreferredSize does not return the correct size.
+
+Steps to reproduce the problem:
+Compile and run the following program.
+
+using System.Diagnostics;
+using System.Drawing;
+using System.Windows.Forms;
+
+static class Test
+{
+	static void Main ()
+	{
+		FlowLayoutPanel panel = new FlowLayoutPanel ();
+		panel.Controls.AddRange (new Control [] { new TestControl 
+(), new TestControl () });
+		Debug.Assert (panel.PreferredSize == new Size (212, 106));
+	}
+}
+
+class TestControl : Control
+{
+	protected override Size DefaultSize {
+		get {
+			return new Size (100, 100);
+		}
+	}
+}


More information about the mono-bugs mailing list