[Mono-bugs] [Bug 367249] New: TableLayoutPanel.SetColumnSpan incompatibility

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Mar 5 04:57:04 EST 2008


           Summary: TableLayoutPanel.SetColumnSpan incompatibility
           Product: Mono: Class Libraries
           Version: 1.9.0
          Platform: x86-64
        OS/Version: SLES 10
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: carsten.sponsel at astrum-it.de
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

The TableLayoutPanel.SetColumnSpan method throws a IndexOutOfRangeException if
the  span value is greater than the ColumnCount. This behaviour is different
then .NET

E.g. that code will crash:

TableLayoutPanel LayoutPanel = new TableLayoutPanel ();
LayoutPanel.ColumnCount = 1;
LayoutPanel.RowCount = 2;

LayoutPanel.ColumnStyles.Add (new ColumnStyle (SizeType.AutoSize));
LayoutPanel.RowStyles.Add (new RowStyle (SizeType.Percent, 100));
LayoutPanel.RowStyles.Add (new RowStyle (SizeType.AutoSize));

Button OkButton = new Button ();
OkButton.Text = "OK";
LayoutPanel.Controls.Add (OkButton);
LayoutPanel.SetColumnSpan (OkButton, 3);

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list