本文整理匯總了VB.NET中System.Windows.Forms.TableLayoutColumnStyleCollection類的典型用法代碼示例。如果您正苦於以下問題:VB.NET TableLayoutColumnStyleCollection類的具體用法?VB.NET TableLayoutColumnStyleCollection怎麽用?VB.NET TableLayoutColumnStyleCollection使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了TableLayoutColumnStyleCollection類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1:
Private Sub toggleColumnStylesBtn_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles toggleColumnStylesBtn.Click
Dim styles As TableLayoutColumnStyleCollection = _
Me.TableLayoutPanel1.ColumnStyles
For Each style As ColumnStyle In styles
If style.SizeType = SizeType.Absolute Then
style.SizeType = SizeType.AutoSize
ElseIf style.SizeType = SizeType.AutoSize Then
style.SizeType = SizeType.Percent
' Set the column width to be a percentage
' of the TableLayoutPanel control's width.
style.Width = 33
Else
' Set the column width to 50 pixels.
style.SizeType = SizeType.Absolute
style.Width = 50
End If
Next
End Sub