TableLayoutPanel.RowCount Property

 

Gets or sets the number of rows in the table.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public int RowCount { get; set; }

Property Value

Type: System.Int32

The number of rows in the TableLayoutPanel control. The default is 0.

You can specify both the ColumnCount and the 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 GrowStyle property allows for such growth. If the value of RowCount is 0, the panel will grow by adding rows, and if the value of ColumnCount is 0, the panel will grow by adding columns. Specifying panel growth with the GrowStyle property is preferred to setting RowCount or ColumnCount to 0, however.

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

.NET Framework
Available since 2.0
Return to top
Show: