How to: Span Rows and Columns in a TableLayoutPanel Control

Controls in a TableLayoutPanel control can span adjacent rows and columns.

Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Working with Settings.

To span columns and rows

  1. Drag a TableLayoutPanel control from the Toolbox onto your form.

  2. Drag a Button control from the Toolbox into the upper-left cell of the TableLayoutPanel control.

  3. Set the Button control's ColumnSpan property to 2. Note that the Button control spans the first and second columns.

  4. Set the Button control's RowSpan property to 2. Note that the Button control spans the first and second rows.

  5. Set the Button control's ColumnSpan property to 1. Note that the Button control moves into the first column and spans the first and second rows.

See Also

Other Resources

TableLayoutPanel Control (Windows Forms)