VB.NET中如何向TableLayoutPanel控件指定行和列写数据?

VB.NET中如何向TableLayoutPanel控件指定行和列写数据?,第1张

SetCellPosition 设置表示单元格的行号和列号的 TableLayoutPanelCellPosition。

SetColumn 设置指定控件的列位置。

SetColumnSpan 设置子控件跨的列数。

SetRow 设置指定子控件的行位置。

SetRowSpan 设置子控件跨的行数。

Button btn = new Button()

this.Controls.Add(btn) //向窗体中追加

tableLayoutPanel1.RowCount = 3

tableLayoutPanel1.SetRow(btn, 2)

//假设你第二行的控件叫button1

tableLayoutPanel1.RowCount=3

//tableLayoutPanel1.RowStyles.Insert(1, new RowStyle(SizeType.Absolute, 20))

tableLayoutPanel1.SetRow(button1, 2)


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/bake/7962405.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-12
下一篇2023-04-12

发表评论

登录后才能评论

评论列表(0条)

    保存