
SetColumnSpan 设置子控件跨的列数。
SetRow 设置指定子控件的行位置。
SetRowSpan 设置子控件跨的行数。
Button btn = new Button()this.Controls.Add(btn) //向窗体中追加
tableLayoutPanel1.RowCount = 3
tableLayoutPanel1.SetRow(btn, 2)
//假设你第二行的控件叫button1tableLayoutPanel1.RowCount=3
//tableLayoutPanel1.RowStyles.Insert(1, new RowStyle(SizeType.Absolute, 20))
tableLayoutPanel1.SetRow(button1, 2)
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)