Author: jpobst
Date: 2007-10-11 10:18:36 -0400 (Thu, 11 Oct 2007)
New Revision: 87333
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/TableLayout.cs
Log:
2007-10-11 Jonathan Pobst <[EMAIL PROTECTED]>
* TableLayout.cs: When calculating the size of AutoSize row/columns,
don't take !Visible controls into account. When laying out controls,
start from the DisplayRectangle instead of (0,0) to account for
a scrolled TableLayoutPanel where the start point is negative.
[Fixes bug #332892]
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/ChangeLog
2007-10-11 12:49:11 UTC (rev 87332)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/ChangeLog
2007-10-11 14:18:36 UTC (rev 87333)
@@ -1,3 +1,11 @@
+2007-10-11 Jonathan Pobst <[EMAIL PROTECTED]>
+
+ * TableLayout.cs: When calculating the size of AutoSize row/columns,
+ don't take !Visible controls into account. When laying out controls,
+ start from the DisplayRectangle instead of (0,0) to account for
+ a scrolled TableLayoutPanel where the start point is negative.
+ [Fixes bug #332892]
+
2007-09-17 Jonathan Pobst <[EMAIL PROTECTED]>
* DefaultLayout.cs: Fix copy/paste error for dist_right. Fixes
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
2007-10-11 12:49:11 UTC (rev 87332)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/TableLayout.cs
2007-10-11 14:18:36 UTC (rev 87333)
@@ -261,7 +261,7 @@
{
Control c =
panel.actual_positions[index, i];
- if (c != null && c !=
dummy_control)
+ if (c != null && c !=
dummy_control && c.VisibleInternal)
{
if (c.Dock ==
DockStyle.Fill || ((c.Anchor & AnchorStyles.Left) == AnchorStyles.Left &&
(c.Anchor & AnchorStyles.Right) == AnchorStyles.Right)) {
if (c.AutoSize)
@@ -342,7 +342,7 @@
for (int i = 0; i < columns; i++) {
Control c =
panel.actual_positions[i, index];
- if (c != null && c !=
dummy_control) {
+ if (c != null && c !=
dummy_control && c.VisibleInternal) {
if (c.Dock ==
DockStyle.Fill || ((c.Anchor & AnchorStyles.Top) == AnchorStyles.Top &&
(c.Anchor & AnchorStyles.Bottom) == AnchorStyles.Bottom)) {
if (c.AutoSize)
max_height = Math.Max (max_height, c.PreferredSize.Height + c.Margin.Vertical);
@@ -403,7 +403,7 @@
int columns = panel.actual_positions.GetLength(0);
int rows = panel.actual_positions.GetLength(1);
- Point current_pos = new Point (border_width,
border_width);
+ Point current_pos = new Point
(panel.DisplayRectangle.Left + border_width, panel.DisplayRectangle.Top +
border_width);
for (int y = 0; y < rows; y++)
{
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches