vb.net中tablelayoutpanel的使用
TableLayoutPanel1.ColumnStyles.Clear()TableLayoutPanel1.RowStyles.Clear()'TableLayout...
TableLayoutPanel1.ColumnStyles.Clear()
TableLayoutPanel1.RowStyles.Clear()
' TableLayoutPanel1.AutoScroll = True
' TableLayoutPanel1.BackColor = Color.Blue
TableLayoutPanel1.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single
' TableLayoutPanel1.ColumnCount = 6
For i = 1 To 20
TableLayoutPanel1.ColumnStyles.Add(New ColumnStyle(SizeType.AutoSize))
TableLayoutPanel1.RowStyles.Add(New RowStyle(SizeType.AutoSize))
Dim lab As New Label
lab.Text = "lab+" & i
lab.AutoSize = True
TableLayoutPanel1.Controls.Add(lab)
TableLayoutPanel1.ColumnCount = i + 1
Next
结果什么都不显示。 展开
TableLayoutPanel1.RowStyles.Clear()
' TableLayoutPanel1.AutoScroll = True
' TableLayoutPanel1.BackColor = Color.Blue
TableLayoutPanel1.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single
' TableLayoutPanel1.ColumnCount = 6
For i = 1 To 20
TableLayoutPanel1.ColumnStyles.Add(New ColumnStyle(SizeType.AutoSize))
TableLayoutPanel1.RowStyles.Add(New RowStyle(SizeType.AutoSize))
Dim lab As New Label
lab.Text = "lab+" & i
lab.AutoSize = True
TableLayoutPanel1.Controls.Add(lab)
TableLayoutPanel1.ColumnCount = i + 1
Next
结果什么都不显示。 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询