Files
docs-desktop/dotnet-desktop-guide/framework/winforms/controls/how-to-span-rows-and-columns-in-a-tablelayoutpanel-control.md
Andy De George c0ba284473 Initial winforms content migrated (#18)
* Merge winforms framework content to working branch (#14)

* Breadcrumb / TOC / Move net5 to net folder (#15)

* change path from net5 to net

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Add .net 5 winforms placeholder article (#16)

* added some metadata and adjusted net5 placeholder

* corrections

* corrections

* corrections

* Test1

* Swapping landing page vs concept

* fix links

* Fix links

* Fix desc
2020-09-01 16:26:21 -07:00

1.5 KiB

title, ms.date, f1_keywords, helpviewer_keywords, ms.assetid
title ms.date f1_keywords helpviewer_keywords ms.assetid
How to: Span Rows and Columns in a TableLayoutPanel Control 03/30/2017
net.ComponentModel.StyleCollectionEditor.TLP.SpanRowsColumns
columns [Windows Forms], spanning
merging cells
TableLayoutPanel control [Windows Forms], spanning rows and columns
rows [Windows Forms], spanning
cells [Windows Forms], merging
a8a2fdd3-a848-48b0-a4cd-4e85ebded87e

How to: Span Rows and Columns in a TableLayoutPanel Control

Controls in a xref:System.Windows.Forms.TableLayoutPanel control can span adjacent rows and columns.

To span columns and rows

  1. Drag a xref:System.Windows.Forms.TableLayoutPanel control from the Toolbox onto your form.

  2. Drag a xref:System.Windows.Forms.Button control from the Toolbox into the upper-left cell of the xref:System.Windows.Forms.TableLayoutPanel control.

  3. Set the xref:System.Windows.Forms.Button control's ColumnSpan property to 2. Note that the xref:System.Windows.Forms.Button control spans the first and second columns.

  4. Set the xref:System.Windows.Forms.Button control's RowSpan property to 2. Note that the xref:System.Windows.Forms.Button control spans the first and second rows.

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

See also