Author: jpobst
Date: 2007-06-21 11:15:30 -0400 (Thu, 21 Jun 2007)
New Revision: 80482

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/System.Windows.Forms/ChangeLog
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutPanel.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:
2007-06-21  Jonathan Pobst  <[EMAIL PROTECTED]>

        * TableLayoutPanel.cs: Implement CellBorderStyle.  [Fixes bug #81884]

2007-06-21  Jonathan Pobst  <[EMAIL PROTECTED]>

        * TableLayout.cs: Take CellBorderStyle into account when laying
        stuff out.  [Fixes bug #81884]

2007-06-21  Jonathan Pobst  <[EMAIL PROTECTED]>

        * TableLayoutTest.cs: Add test for CellBorderStyle.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-06-21 14:33:08 UTC (rev 80481)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-06-21 15:15:30 UTC (rev 80482)
@@ -1,3 +1,7 @@
+2007-06-21  Jonathan Pobst  <[EMAIL PROTECTED]>
+
+       * TableLayoutPanel.cs: Implement CellBorderStyle.  [Fixes bug #81884]
+
 2007-06-20  Carlos Alberto Cortez <[EMAIL PROTECTED]>
 
        * ThemeWin32Classic.cs: In OwnerDraw mode draw subitems only for 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutPanel.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutPanel.cs  
    2007-06-21 14:33:08 UTC (rev 80481)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutPanel.cs  
    2007-06-21 15:15:30 UTC (rev 80482)
@@ -28,6 +28,7 @@
 
 #if NET_2_0
 using System;
+using System.Drawing;
 using System.ComponentModel;
 using System.Runtime.InteropServices;
 using System.Windows.Forms.Layout;
@@ -80,7 +81,13 @@
                [DefaultValue (TableLayoutPanelCellBorderStyle.None)]
                public TableLayoutPanelCellBorderStyle CellBorderStyle {
                        get { return this.cell_border_style; }
-                       set { this.cell_border_style = value; }
+                       set { 
+                               if (this.cell_border_style != value) {
+                                       this.cell_border_style = value;
+                                       this.PerformLayout (this, 
"CellBorderStyle");
+                                       this.Invalidate ();
+                               }
+                       }
                }
 
                [Localizable (true)]
@@ -275,9 +282,216 @@
                protected override void OnPaintBackground (PaintEventArgs e)
                {
                        base.OnPaintBackground (e);
+
+                       DrawCellBorders (e);
+                       
+                       int border_width = GetCellBorderWidth (CellBorderStyle);
+
+                       int x = border_width;
+                       int y = border_width;
+                       
+                       for (int i = 0; i < column_widths.Length; i++) {
+                               for (int j = 0; j < row_heights.Length; j++) {
+                                       this.OnCellPaint (new 
TableLayoutCellPaintEventArgs (e.Graphics, e.ClipRectangle, new Rectangle (x, 
y, column_widths[i] + border_width, row_heights[j] + border_width), i, j));
+                                       y += row_heights[j] + border_width;
+                               }
+
+                               x += column_widths[i] + border_width;
+                               y = border_width;
+                       }
                }
                #endregion
 
+               #region Internal Methods
+               internal static int GetCellBorderWidth 
(TableLayoutPanelCellBorderStyle style)
+               {
+                       switch (style) {
+                               case TableLayoutPanelCellBorderStyle.Single:
+                                       return 1;
+                               case TableLayoutPanelCellBorderStyle.Inset:
+                               case TableLayoutPanelCellBorderStyle.Outset:
+                                       return 2;
+                               case 
TableLayoutPanelCellBorderStyle.InsetDouble:
+                               case 
TableLayoutPanelCellBorderStyle.OutsetPartial:
+                               case 
TableLayoutPanelCellBorderStyle.OutsetDouble:
+                                       return 3;
+                       }
+                       
+                       return 0;
+               }
+               
+               private void DrawCellBorders (PaintEventArgs e)
+               {
+                       Rectangle paint_here = this.Bounds;
+
+                       switch (CellBorderStyle) {
+                               case TableLayoutPanelCellBorderStyle.Single:
+                                       DrawSingleBorder (e.Graphics, 
this.Bounds);
+                                       break;
+                               case TableLayoutPanelCellBorderStyle.Inset:
+                                       DrawInsetBorder (e.Graphics, 
this.Bounds);
+                                       break;
+                               case 
TableLayoutPanelCellBorderStyle.InsetDouble:
+                                       DrawInsetDoubleBorder (e.Graphics, 
paint_here);
+                                       break;
+                               case TableLayoutPanelCellBorderStyle.Outset:
+                                       DrawOutsetBorder (e.Graphics, 
this.Bounds);
+                                       break;
+                               case 
TableLayoutPanelCellBorderStyle.OutsetDouble:
+                               case 
TableLayoutPanelCellBorderStyle.OutsetPartial:
+                                       DrawOutsetDoubleBorder (e.Graphics, 
this.Bounds);
+                                       break;
+                       }
+               }
+
+               private void DrawSingleBorder (Graphics g, Rectangle rect)
+               {
+                       ControlPaint.DrawBorder (g, rect, 
SystemColors.ControlDark, ButtonBorderStyle.Solid);
+
+                       int x = 0;
+                       int y = 0;
+
+                       for (int i = 0; i < column_widths.Length - 1; i++) {
+                               x += column_widths[i] + 1;
+
+                               g.DrawLine (SystemPens.ControlDark, new Point 
(x, 1), new Point (x, Bottom - 2));
+                       }
+
+                       for (int j = 0; j < row_heights.Length - 1; j++) {
+                               y += row_heights[j] + 1;
+
+                               g.DrawLine (SystemPens.ControlDark, new Point 
(1, y), new Point (Right - 2, y));
+                       }
+               }
+
+               private void DrawInsetBorder (Graphics g, Rectangle rect)
+               {
+                       ControlPaint.DrawBorder3D (g, rect, 
Border3DStyle.Etched);
+                       
+                       int x = 0;
+                       int y = 0;
+
+                       for (int i = 0; i < column_widths.Length - 1; i++) {
+                               x += column_widths[i] + 2;
+
+                               g.DrawLine (SystemPens.ControlDark, new Point 
(x, 1), new Point (x, Bottom - 3));
+                               g.DrawLine (Pens.White, new Point (x + 1, 1), 
new Point (x + 1, Bottom - 3));
+                       }
+
+                       for (int j = 0; j < row_heights.Length - 1; j++) {
+                               y += row_heights[j] + 2;
+
+                               g.DrawLine (SystemPens.ControlDark, new Point 
(1, y), new Point (Right - 3, y));
+                               g.DrawLine (Pens.White, new Point (1, y + 1), 
new Point (Right - 3, y + 1));
+                       }
+               }
+
+               private void DrawOutsetBorder (Graphics g, Rectangle rect)
+               {
+                       g.DrawRectangle (SystemPens.ControlDark, new Rectangle 
(rect.Left + 1, rect.Top + 1, rect.Width - 2, rect.Height - 2));
+                       g.DrawRectangle (Pens.White, new Rectangle (rect.Left, 
rect.Top, rect.Width - 2, rect.Height - 2));
+
+                       int x = 0;
+                       int y = 0;
+
+                       for (int i = 0; i < column_widths.Length - 1; i++) {
+                               x += column_widths[i] + 2;
+
+                               g.DrawLine (Pens.White, new Point (x, 1), new 
Point (x, Bottom - 3));
+                               g.DrawLine (SystemPens.ControlDark, new Point 
(x + 1, 1), new Point (x + 1, Bottom - 3));
+                       }
+
+                       for (int j = 0; j < row_heights.Length - 1; j++) {
+                               y += row_heights[j] + 2;
+
+                               g.DrawLine (Pens.White, new Point (1, y), new 
Point (Right - 3, y));
+                               g.DrawLine (SystemPens.ControlDark, new Point 
(1, y + 1), new Point (Right - 3, y + 1));
+                       }
+               }
+
+               private void DrawOutsetDoubleBorder (Graphics g, Rectangle rect)
+               {
+                       rect.Width -= 1;
+                       rect.Height -= 1;
+                       
+                       g.DrawRectangle (SystemPens.ControlDark, new Rectangle 
(rect.Left + 2, rect.Top + 2, rect.Width - 2, rect.Height - 2));
+                       g.DrawRectangle (Pens.White, new Rectangle (rect.Left, 
rect.Top, rect.Width - 2, rect.Height - 2));
+
+                       int x = 0;
+                       int y = 0;
+
+                       for (int i = 0; i < column_widths.Length - 1; i++) {
+                               x += column_widths[i] + 3;
+
+                               g.DrawLine (Pens.White, new Point (x, 3), new 
Point (x, Bottom - 5));
+                               g.DrawLine (SystemPens.ControlDark, new Point 
(x + 2, 3), new Point (x + 2, Bottom - 5));
+                       }
+
+                       for (int j = 0; j < row_heights.Length - 1; j++) {
+                               y += row_heights[j] + 3;
+
+                               g.DrawLine (Pens.White, new Point (3, y), new 
Point (Right - 4, y));
+                               g.DrawLine (SystemPens.ControlDark, new Point 
(3, y + 2), new Point (Right - 4, y + 2));
+                       }
+
+                       x = 0;
+                       y = 0;
+                       
+                       for (int i = 0; i < column_widths.Length - 1; i++) {
+                               x += column_widths[i] + 3;
+
+                               g.DrawLine (ThemeEngine.Current.ResPool.GetPen 
(BackColor), new Point (x + 1, 3), new Point (x + 1, Bottom - 5));
+                       }
+
+                       for (int j = 0; j < row_heights.Length - 1; j++) {
+                               y += row_heights[j] + 3;
+
+                               g.DrawLine (ThemeEngine.Current.ResPool.GetPen 
(BackColor), new Point (3, y + 1), new Point (Right - 4, y + 1));
+                       }
+               }
+       
+               private void DrawInsetDoubleBorder (Graphics g, Rectangle rect)
+               {
+                       rect.Width -= 1;
+                       rect.Height -= 1;
+                       
+                       g.DrawRectangle (Pens.White, new Rectangle (rect.Left + 
2, rect.Top + 2, rect.Width - 2, rect.Height - 2));
+                       g.DrawRectangle (SystemPens.ControlDark, new Rectangle 
(rect.Left, rect.Top, rect.Width - 2, rect.Height - 2));
+
+                       int x = 0;
+                       int y = 0;
+
+                       for (int i = 0; i < column_widths.Length - 1; i++) {
+                               x += column_widths[i] + 3;
+
+                               g.DrawLine (SystemPens.ControlDark, new Point 
(x, 3), new Point (x, Bottom - 5));
+                               g.DrawLine (Pens.White, new Point (x + 2, 3), 
new Point (x + 2, Bottom - 5));
+                       }
+
+                       for (int j = 0; j < row_heights.Length - 1; j++) {
+                               y += row_heights[j] + 3;
+
+                               g.DrawLine (SystemPens.ControlDark, new Point 
(3, y), new Point (Right - 4, y));
+                               g.DrawLine (Pens.White, new Point (3, y + 2), 
new Point (Right - 4, y + 2));
+                       }
+
+                       x = 0;
+                       y = 0;
+                       
+                       for (int i = 0; i < column_widths.Length - 1; i++) {
+                               x += column_widths[i] + 3;
+
+                               g.DrawLine (ThemeEngine.Current.ResPool.GetPen 
(BackColor), new Point (x + 1, 3), new Point (x + 1, Bottom - 5));
+                       }
+
+                       for (int j = 0; j < row_heights.Length - 1; j++) {
+                               y += row_heights[j] + 3;
+
+                               g.DrawLine (ThemeEngine.Current.ResPool.GetPen 
(BackColor), new Point (3, y + 1), new Point (Right - 4, y + 1));
+                       }
+               }
+               #endregion
+               
                #region Public Events
                static object CellPaintEvent = new object ();
 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/ChangeLog 
2007-06-21 14:33:08 UTC (rev 80481)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/ChangeLog 
2007-06-21 15:15:30 UTC (rev 80482)
@@ -1,3 +1,8 @@
+2007-06-21  Jonathan Pobst  <[EMAIL PROTECTED]>
+
+       * TableLayout.cs: Take CellBorderStyle into account when laying
+       stuff out.  [Fixes bug #81884]
+
 2007-06-12  Jonathan Pobst  <[EMAIL PROTECTED]>
 
        * TableLayout.cs: When we come across a Dock=Fill control, use the

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-06-21 14:33:08 UTC (rev 80481)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/TableLayout.cs
    2007-06-21 15:15:30 UTC (rev 80482)
@@ -200,6 +200,8 @@
                        panel.column_widths = new 
int[panel.actual_positions.GetLength (0)];
                        panel.row_heights = new 
int[panel.actual_positions.GetLength (1)];
 
+                       int border_width = TableLayoutPanel.GetCellBorderWidth 
(panel.CellBorderStyle);
+                               
                        Rectangle parentDisplayRectangle = 
panel.DisplayRectangle;
 
                        TableLayoutColumnStyleCollection col_styles = new 
TableLayoutColumnStyleCollection (panel);
@@ -232,7 +234,7 @@
                                col_styles.RemoveAt (col_styles.Count - 1);
                                
                        // Figure up all the column widths
-                       int total_width = parentDisplayRectangle.Width;
+                       int total_width = parentDisplayRectangle.Width - 
(border_width * (columns + 1));
                        int index = 0;
 
                        // First assign all the Absolute sized columns..
@@ -314,7 +316,7 @@
                                panel.column_widths[col_styles.Count - 1] += 
total_width;
 
                        // Figure up all the row heights
-                       int total_height = parentDisplayRectangle.Height;
+                       int total_height = parentDisplayRectangle.Height - 
(border_width * columns);
                        index = 0;
 
                        // First assign all the Absolute sized rows..
@@ -391,15 +393,17 @@
                private void LayoutControls (TableLayoutPanel panel)
                {
                        TableLayoutSettings settings = panel.LayoutSettings;
+                       
+                       int border_width = TableLayoutPanel.GetCellBorderWidth 
(panel.CellBorderStyle);
 
                        int columns = panel.actual_positions.GetLength(0);
                        int rows = panel.actual_positions.GetLength(1);
-                       
-                       Point current_pos = new Point(0,0);
-                       
+
+                       Point current_pos = new Point (border_width, 
border_width);
+
                        for (int y = 0; y < rows; y++)
                        {
-                               for (int x = 0; x < columns; x ++)
+                               for (int x = 0; x < columns; x++)
                                {
                                        Control c = panel.actual_positions[x,y];
                                        
@@ -452,10 +456,10 @@
                                                c.SetBounds (new_x, new_y, 
new_width, new_height, BoundsSpecified.None);
                                        }
 
-                                       current_pos.Offset 
(panel.column_widths[x], 0);
+                                       current_pos.Offset 
(panel.column_widths[x] + border_width, 0);
                                }
 
-                               current_pos.Offset (-1 * current_pos.X, 
panel.row_heights[y]);
+                               current_pos.Offset ((-1 * current_pos.X) + 
border_width, 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   
2007-06-21 14:33:08 UTC (rev 80481)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2007-06-21 15:15:30 UTC (rev 80482)
@@ -1,3 +1,7 @@
+2007-06-21  Jonathan Pobst  <[EMAIL PROTECTED]>
+
+       * TableLayoutTest.cs: Add test for CellBorderStyle.
+
 2007-06-12  Jonathan Pobst  <[EMAIL PROTECTED]>
 
        * FormTest.cs: Add tests for ScaleControl and GetScaledBounds.

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
  2007-06-21 14:33:08 UTC (rev 80481)
+++ 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TableLayoutTest.cs
  2007-06-21 15:15:30 UTC (rev 80482)
@@ -918,6 +918,126 @@
                        
                        f.Dispose ();
                }
+               
+               [Test]  // From bug #81884
+               public void CellBorderStyle ()
+               {
+                       Form f = new Form ();
+                       f.ShowInTaskbar = false;
+
+                       TableLayoutPanel p = new TableLayoutPanel ();
+                       p = new TableLayoutPanel ();
+                       p.ColumnCount = 3;
+                       p.ColumnStyles.Add (new ColumnStyle ());
+                       p.ColumnStyles.Add (new ColumnStyle ());
+                       p.ColumnStyles.Add (new ColumnStyle ());
+                       p.Dock = DockStyle.Top;
+                       p.Height = 200;
+                       p.RowCount = 2;
+                       p.RowStyles.Add (new RowStyle (SizeType.Percent, 50F));
+                       p.RowStyles.Add (new RowStyle (SizeType.Percent, 50F));
+                       f.Controls.Add (p);
+
+                       Label _labelA = new Label ();
+                       _labelA.Dock = DockStyle.Fill;
+                       _labelA.Size = new Size (95, 20);
+                       _labelA.Text = "A";
+                       p.Controls.Add (_labelA, 0, 0);
+
+                       Label _labelB = new Label ();
+                       _labelB.Dock = DockStyle.Fill;
+                       _labelB.Size = new Size (95, 20);
+                       _labelB.Text = "B";
+                       p.Controls.Add (_labelB, 1, 0);
+
+                       Label _labelC = new Label ();
+                       _labelC.Dock = DockStyle.Fill;
+                       _labelC.Size = new Size (95, 20);
+                       _labelC.Text = "C";
+                       p.Controls.Add (_labelC, 2, 0);
+
+                       Label _labelD = new Label ();
+                       _labelD.Dock = DockStyle.Fill;
+                       _labelD.Size = new Size (95, 20);
+                       _labelD.Text = "D";
+                       p.Controls.Add (_labelD, 0, 1);
+
+                       Label _labelE = new Label ();
+                       _labelE.Dock = DockStyle.Fill;
+                       _labelE.Size = new Size (95, 20);
+                       _labelE.Text = "E";
+                       p.Controls.Add (_labelE, 1, 1);
+
+                       Label _labelF = new Label ();
+                       _labelF.Dock = DockStyle.Fill;
+                       _labelF.Size = new Size (95, 20);
+                       _labelF.Text = "F";
+                       p.Controls.Add (_labelF, 2, 1);
+
+                       _labelA.BackColor = Color.Red;
+                       _labelB.BackColor = Color.Orange;
+                       _labelC.BackColor = Color.Yellow;
+                       _labelD.BackColor = Color.Green;
+                       _labelE.BackColor = Color.Blue;
+                       _labelF.BackColor = Color.Purple;
+
+                       f.Show ();
+                       // None
+                       Assert.AreEqual (new Rectangle (3, 0, 95, 100), 
_labelA.Bounds, "A1");
+                       Assert.AreEqual (new Rectangle (104, 0, 95, 100), 
_labelB.Bounds, "A2");
+                       Assert.AreEqual (new Rectangle (205, 0, 95, 100), 
_labelC.Bounds, "A3");
+                       Assert.AreEqual (new Rectangle (3, 100, 95, 100), 
_labelD.Bounds, "A4");
+                       Assert.AreEqual (new Rectangle (104, 100, 95, 100), 
_labelE.Bounds, "A5");
+                       Assert.AreEqual (new Rectangle (205, 100, 95, 100), 
_labelF.Bounds, "A6");
+                       
+                       p.CellBorderStyle = 
TableLayoutPanelCellBorderStyle.Single;
+                       Assert.AreEqual (new Rectangle (4, 1, 95, 98), 
_labelA.Bounds, "A7");
+                       Assert.AreEqual (new Rectangle (106, 1, 95, 98), 
_labelB.Bounds, "A8");
+                       Assert.AreEqual (new Rectangle (208, 1, 95, 98), 
_labelC.Bounds, "A9");
+                       Assert.AreEqual (new Rectangle (4, 100, 95, 99), 
_labelD.Bounds, "A10");
+                       Assert.AreEqual (new Rectangle (106, 100, 95, 99), 
_labelE.Bounds, "A11");
+                       Assert.AreEqual (new Rectangle (208, 100, 95, 99), 
_labelF.Bounds, "A12");
+
+                       p.CellBorderStyle = 
TableLayoutPanelCellBorderStyle.Inset;
+                       Assert.AreEqual (new Rectangle (5, 2, 95, 97), 
_labelA.Bounds, "A13");
+                       Assert.AreEqual (new Rectangle (108, 2, 95, 97), 
_labelB.Bounds, "A14");
+                       Assert.AreEqual (new Rectangle (211, 2, 95, 97), 
_labelC.Bounds, "A15");
+                       Assert.AreEqual (new Rectangle (5, 101, 95, 97), 
_labelD.Bounds, "A16");
+                       Assert.AreEqual (new Rectangle (108, 101, 95, 97), 
_labelE.Bounds, "A17");
+                       Assert.AreEqual (new Rectangle (211, 101, 95, 97), 
_labelF.Bounds, "A18");
+
+                       p.CellBorderStyle = 
TableLayoutPanelCellBorderStyle.InsetDouble;
+                       Assert.AreEqual (new Rectangle (6, 3, 95, 95), 
_labelA.Bounds, "A19");
+                       Assert.AreEqual (new Rectangle (110, 3, 95, 95), 
_labelB.Bounds, "A20");
+                       Assert.AreEqual (new Rectangle (214, 3, 95, 95), 
_labelC.Bounds, "A21");
+                       Assert.AreEqual (new Rectangle (6, 101, 95, 96), 
_labelD.Bounds, "A22");
+                       Assert.AreEqual (new Rectangle (110, 101, 95, 96), 
_labelE.Bounds, "A23");
+                       Assert.AreEqual (new Rectangle (214, 101, 95, 96), 
_labelF.Bounds, "A24");
+
+                       p.CellBorderStyle = 
TableLayoutPanelCellBorderStyle.Outset;
+                       Assert.AreEqual (new Rectangle (5, 2, 95, 97), 
_labelA.Bounds, "A25");
+                       Assert.AreEqual (new Rectangle (108, 2, 95, 97), 
_labelB.Bounds, "A26");
+                       Assert.AreEqual (new Rectangle (211, 2, 95, 97), 
_labelC.Bounds, "A27");
+                       Assert.AreEqual (new Rectangle (5, 101, 95, 97), 
_labelD.Bounds, "A28");
+                       Assert.AreEqual (new Rectangle (108, 101, 95, 97), 
_labelE.Bounds, "A29");
+                       Assert.AreEqual (new Rectangle (211, 101, 95, 97), 
_labelF.Bounds, "A30");
+
+                       p.CellBorderStyle = 
TableLayoutPanelCellBorderStyle.OutsetDouble;
+                       Assert.AreEqual (new Rectangle (6, 3, 95, 95), 
_labelA.Bounds, "A31");
+                       Assert.AreEqual (new Rectangle (110, 3, 95, 95), 
_labelB.Bounds, "A32");
+                       Assert.AreEqual (new Rectangle (214, 3, 95, 95), 
_labelC.Bounds, "A33");
+                       Assert.AreEqual (new Rectangle (6, 101, 95, 96), 
_labelD.Bounds, "A34");
+                       Assert.AreEqual (new Rectangle (110, 101, 95, 96), 
_labelE.Bounds, "A35");
+                       Assert.AreEqual (new Rectangle (214, 101, 95, 96), 
_labelF.Bounds, "A36");
+
+                       p.CellBorderStyle = 
TableLayoutPanelCellBorderStyle.OutsetPartial;
+                       Assert.AreEqual (new Rectangle (6, 3, 95, 95), 
_labelA.Bounds, "A37");
+                       Assert.AreEqual (new Rectangle (110, 3, 95, 95), 
_labelB.Bounds, "A38");
+                       Assert.AreEqual (new Rectangle (214, 3, 95, 95), 
_labelC.Bounds, "A39");
+                       Assert.AreEqual (new Rectangle (6, 101, 95, 96), 
_labelD.Bounds, "A40");
+                       Assert.AreEqual (new Rectangle (110, 101, 95, 96), 
_labelE.Bounds, "A41");
+                       Assert.AreEqual (new Rectangle (214, 101, 95, 96), 
_labelF.Bounds, "A42");
+               }
        }
 }
 #endif
\ No newline at end of file

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to