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

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

TableLayoutRowStyleCollection クラス

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

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

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

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

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

使用例使用例

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

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



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

辞書ショートカット

すべての辞書の索引

「TableLayoutRowStyleCollection クラス」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS