This example demonstrates a seldom-used control: TableLayoutPanel. Add a TableLayoutPanel to the form and dock it to fill the form.
Select the control and click the SmartTag on its upper right corner. (It looks like a little white square with a black triangle in it.) Use the Add Column, Add Row, Remove Last Column, and Remove Last Row commands to get the number of rows and columns you want. This example uses one row and three columns.
If the SmartTag is closed, open it again and select the "Edit Rows and Columns" command. Select the row or column you want to edit in the list on the left. Then use the controls on the right to set the item's size.
For this example, set these values:
Column | Size Type | Size Value |
Column1 | Percent | 50 |
Column2 | Absolute | 100 |
Column3 | Percent | 50 |
Now when the form resizes, the middle column remains 100 pixels wide and the other columns share the remaining available space. Use Dock, Anchor, and other properties to arrange the controls inside each of the TableLayoutPanel's cells.
|