tb.Text = "Hello World"
this.tableLayoutPanel1.Controls.Add(tb, 1, 1)
//假设你第二行的控件叫button1tableLayoutPanel1.RowCount=3
//tableLayoutPanel1.RowStyles.Insert(1, new RowStyle(SizeType.Absolute, 20))
tableLayoutPanel1.SetRow(button1, 2)
Button btn = new Button()this.Controls.Add(btn) //向窗体中追加
tableLayoutPanel1.RowCount = 3
tableLayoutPanel1.SetRow(btn, 2)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)