Files
docs-desktop/dotnet-desktop-guide/framework/winforms/controls/how-to-edit-columns-and-rows-in-a-tablelayoutpanel-control.md
T
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

2.6 KiB

title, description, ms.date, f1_keywords, helpviewer_keywords, ms.assetid
title description ms.date f1_keywords helpviewer_keywords ms.assetid
How to: Edit Columns and Rows in a TableLayoutPanel Control Learn how to use the Column and Row Styles dialog box to edit the rows and columns of your Windows Forms controls. 03/30/2017
net.ComponentModel.StyleCollectionEditor
columns [Windows Forms], editing
TableLayoutPanel control [Windows Forms], editing
rows [Windows Forms], editing
c367ed43-40dc-49eb-9e0f-ba70e83dfec0

How to: Edit Columns and Rows in a TableLayoutPanel Control

You can use the collection editor of the xref:System.Windows.Forms.TableLayoutPanel control, called the Column and Row Styles dialog box, to edit the rows and columns of your controls.

Note

If you want a control to span multiple rows or columns, set the RowSpan and ColumnSpan properties on the control. For more information, see Walkthrough: Arranging Controls on Windows Forms Using a TableLayoutPanel.

If you want to align a control within a cell, or if you want a control to stretch within a cell, use the control's xref:System.Windows.Forms.Control.Anchor%2A property. For more information, see Walkthrough: Arranging Controls on Windows Forms Using a TableLayoutPanel.

To edit rows and columns

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

  2. Click the xref:System.Windows.Forms.TableLayoutPanel control's designer actions glyph (Small black arrow) and select Edit Rows and Columns to open the Column and Row Styles dialog box. You can also right click on the xref:System.Windows.Forms.TableLayoutPanel control and select Edit Rows and Columns from the shortcut menu.

  3. To add or remove columns, select Columns from the Member type drop-down list box.

  4. To add or remove rows, select Rows from the Member type drop-down list box.

  5. Click the Add button to add a row or column to the end of the Member list.

  6. Click the Insert button to add a row or column before the currently selected item in the list.

  7. If you are adding a row or column, select the Size Type for the new row or column. For more information, see xref:System.Windows.Forms.SizeType.

  8. To remove a row or column, click the Remove button to delete the currently selected item in the Member list.

See also