TableLayoutPanel.ColumnStyles プロパティ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Dim instance As TableLayoutPanel Dim value As TableLayoutColumnStyleCollection value = instance.ColumnStyles
public: property TableLayoutColumnStyleCollection^ ColumnStyles { TableLayoutColumnStyleCollection^ get (); }
TableLayoutPanel コントロール内の各列の ColumnStyle を格納している TableLayoutColumnStyleCollection。

ColumnStyles プロパティを使用すると、特定の列のスタイル プロパティにアクセスできます。ColumnStyle クラスのメンバを使用すると、テーブル内の個別の列の特性を設定できます。
TableLayoutPanel コントロールが列を配置する場合、各 ColumnStyle に次の順序で優先順位を割り当てます。

Button がクリックされたときに各列の ColumnStyle プロパティを設定するコード例を次に示します。
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
private void toggleColumnStylesBtn_Click( System.Object sender, System.EventArgs e) { TableLayoutColumnStyleCollection styles = this.TableLayoutPanel1.ColumnStyles; foreach( ColumnStyle style in styles ) { if( style.SizeType == SizeType.Absolute ) { style.SizeType = SizeType.AutoSize; } else if( style.SizeType == SizeType.AutoSize ) { 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; } } }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からTableLayoutPanel.ColumnStyles プロパティを検索する場合は、下記のリンクをクリックしてください。

- TableLayoutPanel.ColumnStyles プロパティのページへのリンク