TableLayoutPanel.RowCount Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the maximum number of rows allowed in the table.
public:
property int RowCount { int get(); void set(int value); };
public int RowCount { get; set; }
member this.RowCount : int with get, set
Public Property RowCount As Integer
The maximum number of rows in the TableLayoutPanel control. The default is 0.
Setting the RowCount property does not create rows or allocate any backing memory. Memory allocation occurs when the rows are created, so you can set this property to MaxValue.
Setting this property causes the table to undergo another layout operation.
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 | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
Обратна връзка за .NET
.NET е проект с отворен код. Изберете връзка, за да предоставите обратна връзка: