System.Windows.Forms.TableLayoutPanel.ColumnCount Property

Gets or sets the number of columns in the table.

Syntax

[System.ComponentModel.DefaultValue(0)]
[System.ComponentModel.Localizable(true)]
public int ColumnCount { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

You can specify both the TableLayoutPanel.ColumnCount and the TableLayoutPanel.RowCount properties for layouts with a known and fixed number of cells. You can also specify one property or the other if you expect the number of cells in your layout to grow, assuming that the TableLayoutPanel.GrowStyle property allows for such growth. If the value of TableLayoutPanel.RowCount is 0, the panel will grow by adding rows, and if the value of TableLayoutPanel.ColumnCount is 0, the panel will grow by adding columns. Specifying panel growth with the TableLayoutPanel.GrowStyle property is preferred to setting TableLayoutPanel.RowCount or TableLayoutPanel.ColumnCount to 0, however.

Controls can be added or deleted from the table using the TableLayoutPanel.Controls property.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0