Author: jpobst
Date: 2008-01-22 16:21:59 -0500 (Tue, 22 Jan 2008)
New Revision: 93576
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/TableLayout.cs
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TableLayoutTest.cs
Log:
2008-01-22 Jonathan Pobst <[EMAIL PROTECTED]>
* TableLayout.cs: When we reset our current_pos back to the left
beginning, make sure we take padding into account.
[Fixes bug #354676]
2008-01-22 Jonathan Pobst <[EMAIL PROTECTED]>
* TableLayoutTest.cs: Add test for bug #354676.
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/ChangeLog
2008-01-22 21:13:49 UTC (rev 93575)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/ChangeLog
2008-01-22 21:21:59 UTC (rev 93576)
@@ -1,3 +1,9 @@
+2008-01-22 Jonathan Pobst <[EMAIL PROTECTED]>
+
+ * TableLayout.cs: When we reset our current_pos back to the left
+ beginning, make sure we take padding into account.
+ [Fixes bug #354676]
+
2007-12-13 Jonathan Pobst <[EMAIL PROTECTED]>
* TableLayout.cs: Use ExplicitBounds so that we get the user requested
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/TableLayout.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/TableLayout.cs
2008-01-22 21:13:49 UTC (rev 93575)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/TableLayout.cs
2008-01-22 21:21:59 UTC (rev 93576)
@@ -468,7 +468,7 @@
current_pos.Offset
(panel.column_widths[x] + border_width, 0);
}
- current_pos.Offset ((-1 * current_pos.X) +
border_width, panel.row_heights[y] + border_width);
+ current_pos.Offset ((-1 * current_pos.X) +
border_width + panel.DisplayRectangle.Left, panel.row_heights[y] +
border_width);
}
}
}
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2008-01-22 21:13:49 UTC (rev 93575)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2008-01-22 21:21:59 UTC (rev 93576)
@@ -1,5 +1,9 @@
2008-01-22 Jonathan Pobst <[EMAIL PROTECTED]>
+ * TableLayoutTest.cs: Add test for bug #354676.
+
+2008-01-22 Jonathan Pobst <[EMAIL PROTECTED]>
+
* ScrollabeControlTest.cs: Add test for bug #354676.
2008-01-22 Jonathan Pobst <[EMAIL PROTECTED]>
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TableLayoutTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TableLayoutTest.cs
2008-01-22 21:13:49 UTC (rev 93575)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TableLayoutTest.cs
2008-01-22 21:21:59 UTC (rev 93576)
@@ -1263,6 +1263,33 @@
f.Dispose ();
}
+
+ [Test]
+ public void Bug354676 ()
+ {
+ Form f = new Form ();
+
+ TableLayoutPanel tlp = new TableLayoutPanel ();
+ tlp.Dock = DockStyle.Fill;
+ tlp.Padding = new Padding (40);
+ tlp.RowCount = 2;
+ tlp.ColumnCount = 1;
+ f.Controls.Add (tlp);
+
+ Button b1 = new Button ();
+ tlp.Controls.Add (b1);
+
+ Button b2 = new Button ();
+ tlp.Controls.Add (b2);
+
+ f.Show ();
+
+ Assert.AreEqual (new Rectangle (43, 43, 75, 23),
b1.Bounds, "A1");
+ Assert.AreEqual (new Rectangle (43, 72, 75, 23),
b2.Bounds, "A2");
+
+ f.Close ();
+ f.Dispose ();
+ }
}
}
#endif
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches