[英]Adding a row to a TableLayoutPanel in C# Windows Form
I am currently developing an application in C# using Windows Forms. 我目前正在使用Windows Forms在C#中开发应用程序。
I am using a TableLayoutPanel with two columns. 我正在使用一个有两列的TableLayoutPanel。 How do I add a new row programatically to the table.
如何以编程方式向表中添加新行。 I have tried doing a google search, but the only problem is I am only finding adding a new row style which doesn't seem right to me.
我试过做谷歌搜索,但唯一的问题是我只是发现添加一个新的行样式,这对我来说似乎不对。
Thank you for your help 谢谢您的帮助
Nope that's correct. 不,那是对的。 If you want to add a row you need to use
RowStyles.Add()
. 如果要添加行,则需要使用
RowStyles.Add()
。
One easy way of checking this for you self of course is to look at the Form.Designer.cs code. 当然,为您自己检查这一点的一种简单方法是查看Form.Designer.cs代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.