--- title: "How to: Align and Stretch a Control in a TableLayoutPanel Control" ms.date: "03/30/2017" f1_keywords: - "net.ComponentModel.StyleCollectionEditor.TLP.AlignStretchCtrl" helpviewer_keywords: - "TableLayoutPanel control [Windows Forms], stretching controls" - "controls [Windows Forms], stretching" - "controls [Windows Forms], aligning" ms.assetid: 7dc1a157-6fee-4995-8ebc-b65bdc0909a8 --- # How to: Align and Stretch a Control in a TableLayoutPanel Control You can align and stretch controls in a with the and properties. ## Align and stretch a control 1. In Visual Studio, drag a control from the **Toolbox** onto your form. 2. Drag a control from the **Toolbox** into the upper-left cell of the control. The control is centered in the cell. 3. Set the value of the control's property to `Left,Right`. The control stretches to match the width of the cell. 4. Set the value of the control's property to `Top,Bottom`. The control stretches to match the height of the cell. 5. Set the value of the control's property to . The control expands to fill the cell. 6. Set the value of the control's property to . The control returns to its original size and moves to the upper-left corner of the cell. The **Windows Forms Designer** has set the property to `Top, Left`. 7. Set the value of the control's property to `Bottom,Right`. The control moves to the lower-right corner of the cell. 8. Set the value of the control's property to . The control moves to the center of the cell. ## See also - [TableLayoutPanel Control](tablelayoutpanel-control-windows-forms.md)