TableLayoutPanel.RowStyles プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > TableLayoutPanel.RowStyles プロパティの意味・解説 

TableLayoutPanel.RowStyles プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

TableLayoutPanel の行スタイルコレクション取得します

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

Public ReadOnly Property
 RowStyles As TableLayoutRowStyleCollection
Dim instance As TableLayoutPanel
Dim value As TableLayoutRowStyleCollection

value = instance.RowStyles
public TableLayoutRowStyleCollection RowStyles { get;
 }
public:
property TableLayoutRowStyleCollection^ RowStyles {
    TableLayoutRowStyleCollection^ get ();
}
/** @property */
public TableLayoutRowStyleCollection get_RowStyles ()
public function get RowStyles
 () : TableLayoutRowStyleCollection

プロパティ
TableLayoutPanel コントロール内の各行の RowStyle を格納している TableLayoutRowStyleCollection。

解説解説
使用例使用例

Buttonクリックされたときに各行RowStyle プロパティ設定するコード例次に示します

Private Sub toggleRowStylesBtn_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles toggleRowStylesBtn.Click

    Dim styles As TableLayoutRowStyleCollection
 = _
    Me.TableLayoutPanel1.RowStyles

    For Each style As RowStyle
 In styles

        If style.SizeType = SizeType.Absolute Then

            style.SizeType = SizeType.AutoSize

        ElseIf style.SizeType = SizeType.AutoSize Then

            style.SizeType = SizeType.Percent

            ' Set the row height to be a percentage
            ' of the TableLayoutPanel control's height.
            style.Height = 33

        Else

            ' Set the row height to 50 pixels.
            style.SizeType = SizeType.Absolute
            style.Height = 50

        End If

    Next

End Sub
private void toggleRowStylesBtn_Click(
    System.Object sender, 
    System.EventArgs e)
{
    TableLayoutRowStyleCollection styles = 
        this.TableLayoutPanel1.RowStyles;

    foreach( RowStyle style in styles )
    {
        if (style.SizeType==SizeType.Absolute)
        {
            style.SizeType = SizeType.AutoSize;
        }
        else if(style.SizeType==SizeType.AutoSize)
        {
            style.SizeType = SizeType.Percent;

            // Set the row height to be a percentage
            // of the TableLayoutPanel control's height.
            style.Height = 33;
        }
        else
        {

            // Set the row height to 50 pixels.
            style.SizeType = SizeType.Absolute;
            style.Height = 50;
        }
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
TableLayoutPanel クラス
TableLayoutPanel メンバ
System.Windows.Forms 名前空間
RowStyle クラス
TableLayoutPanel.ColumnStyles プロパティ
その他の技術情報
TableLayoutPanel コントロールにおける AutoSize 動作



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

辞書ショートカット

すべての辞書の索引

「TableLayoutPanel.RowStyles プロパティ」の関連用語

TableLayoutPanel.RowStyles プロパティのお隣キーワード
検索ランキング

   

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



TableLayoutPanel.RowStyles プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS