TableLayoutColumnStyleCollection クラスとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > TableLayoutColumnStyleCollection クラスの意味・解説 

TableLayoutColumnStyleCollection クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

ColumnStyle オブジェクト格納するコレクション

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Class TableLayoutColumnStyleCollection
    Inherits TableLayoutStyleCollection
Dim instance As TableLayoutColumnStyleCollection
public class TableLayoutColumnStyleCollection
 : TableLayoutStyleCollection
public ref class TableLayoutColumnStyleCollection
 : public TableLayoutStyleCollection
public class TableLayoutColumnStyleCollection
 extends TableLayoutStyleCollection
public class TableLayoutColumnStyleCollection
 extends TableLayoutStyleCollection
解説解説

TableLayoutColumnStyleCollection クラスは、関連付けられた TableLayoutPanel に含まれる列を表すために使用するすべてのスタイルコレクション表します

使用例使用例

TableLayoutColumnStyleCollectionColumnStyle設定する方法次の例に示します。このコード例TableLayoutPanel コントロールトピック取り上げているコード例一部です。

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;
        }
    }
}
継承階層継承階層
System.Object
   System.Windows.Forms.TableLayoutStyleCollection
    System.Windows.Forms.TableLayoutColumnStyleCollection
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
TableLayoutColumnStyleCollection メンバ
System.Windows.Forms 名前空間
TableLayoutPanel
ArrayList
TableLayoutRowStyleCollection


このページでは「.NET Framework クラス ライブラリ リファレンス」からTableLayoutColumnStyleCollection クラスを検索した結果を表示しています。
Weblioに収録されているすべての辞書からTableLayoutColumnStyleCollection クラスを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からTableLayoutColumnStyleCollection クラス を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「TableLayoutColumnStyleCollection クラス」の関連用語

TableLayoutColumnStyleCollection クラスのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



TableLayoutColumnStyleCollection クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS