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

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

TabControl.RowCount プロパティ

コントロールタブ ストリップに現在表示されている行の数を取得します

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

Dim instance As TabControl
Dim value As Integer

value = instance.RowCount
public int RowCount { get;
 }
public:
property int RowCount {
    int get ();
}
/** @property */
public int get_RowCount ()

プロパティ
タブ ストリップに現在表示されている行の数。

解説解説

Multiline プロパティtrue場合タブ表示されている行の数を確認するには、RowCount プロパティ使用します

使用例使用例

5 つの TabPage オブジェクトのある TabControl を作成するコード例次に示します。この例では、RowCount プロパティ使用してtabControl1 タブ ストリップ内の現在の行数取得します

この例では、System.Drawing 名前空間System.Windows.Forms 名前空間使用します

Imports System.Drawing
Imports System.Windows.Forms

Public Class Form1
    Inherits Form

    Public Sub New()
        Dim tabControl1 As New
 TabControl()
        Dim tabPage1 As New
 TabPage()
        Dim tabPage2 As New
 TabPage()
        Dim tabPage3 As New
 TabPage()
        Dim tabPage4 As New
 TabPage()
        Dim tabPage5 As New
 TabPage()
        Dim label1 As New
 Label()

        ' Allows multiple rows of tabs in the tabControl1 tab strip.
        tabControl1.Multiline = True

        tabControl1.SizeMode = TabSizeMode.FillToRight
        tabControl1.Padding = New Point(15, 5)
        tabControl1.Controls.AddRange(New Control() {tabPage1,
 tabPage2, tabPage3, tabPage4, tabPage5})
        tabControl1.Location = New Point(35, 65)
        tabControl1.Size = New Size(220, 180)

        ' Gets the number of rows currently in the tabControl1 tab strip.
        ' Assigns int value to the rows variable.
        Dim rows As Integer
 = tabControl1.RowCount

        label1.Text = "There are " + rows.ToString()
 + " rows of tabs in the tabControl1 tab strip."
        label1.Location = New Point(35, 25)
        label1.Size = New Size(220, 30)

        Size = New Size(300, 300)
        Controls.AddRange(New Control() {label1, tabControl1})
    End Sub

    Shared Sub Main()
        Application.Run(New Form1())
    End Sub
End Class
using System.Drawing;
using System.Windows.Forms;

public class Form1 : Form
{
    public Form1()
    {
        TabControl tabControl1 = new TabControl();
        TabPage tabPage1 = new TabPage();
        TabPage tabPage2 = new TabPage();
        TabPage tabPage3 = new TabPage();
        TabPage tabPage4 = new TabPage();
        TabPage tabPage5 = new TabPage();
        Label label1= new Label();

        // Allows multiple rows of tabs in the tabControl1 tab strip.
        tabControl1.Multiline = true;

        tabControl1.SizeMode = TabSizeMode.FillToRight;
        tabControl1.Padding = new Point(15, 5);
        tabControl1.Controls.AddRange(new Control[] {
            tabPage1, tabPage2, tabPage3, tabPage4, tabPage5});
        tabControl1.Location = new Point(35, 65);
        tabControl1.Size = new Size(220, 180);    

        // Gets the number of rows currently in the tabControl1 tab
 strip.
        // Assigns int value to the rows variable.
        int rows = tabControl1.RowCount;

        label1.Text = "There are " + rows.ToString() + 
            " rows of tabs in the tabControl1 tab strip.";
        label1.Location = new Point(35, 25);
        label1.Size = new Size(220, 30);

        Size = new Size(300, 300);
        Controls.AddRange(new Control[] {label1, tabControl1});
    }

    static void Main() 
    {
        Application.Run(new Form1());
    }
}
using namespace System::Drawing;
using namespace System::Windows::Forms;
public ref class Form1: public
 Form
{
public:
   Form1()
   {
      TabControl^ tabControl1 = gcnew TabControl;
      TabPage^ tabPage1 = gcnew TabPage;
      TabPage^ tabPage2 = gcnew TabPage;
      TabPage^ tabPage3 = gcnew TabPage;
      TabPage^ tabPage4 = gcnew TabPage;
      TabPage^ tabPage5 = gcnew TabPage;
      Label^ label1 = gcnew Label;
      
      // Allows multiple rows of tabs in the tabControl1 tab strip.
      tabControl1->Multiline = true;
      tabControl1->SizeMode = TabSizeMode::FillToRight;
      tabControl1->Padding = Point(15,5);
      array<Control^>^temp0 = {tabPage1,tabPage2,tabPage3,tabPage4,tabPage5};
      tabControl1->Controls->AddRange( temp0 );
      tabControl1->Location = Point(35,65);
      tabControl1->Size = System::Drawing::Size( 220, 180 );
      
      // Gets the number of rows currently in the tabControl1 tab strip.
      // Assigns int value to the rows variable.
      int rows = tabControl1->RowCount;
      label1->Text = System::String::Concat( "There are ", rows, "
 rows of tabs in the tabControl1 tab strip." );
      label1->Location = Point(35,25);
      label1->Size = System::Drawing::Size( 220, 30 );
      Size = System::Drawing::Size( 300, 300 );
      array<Control^>^temp1 = {label1,tabControl1};
      Controls->AddRange( temp1 );
   }

};

int main()
{
   Application::Run( gcnew Form1 );
}

import System.Drawing.*;
import System.Windows.Forms.*;

public class Form1 extends Form
{
    public Form1()
    {
        TabControl tabControl1 = new TabControl();
        TabPage tabPage1 = new TabPage();
        TabPage tabPage2 = new TabPage();
        TabPage tabPage3 = new TabPage();
        TabPage tabPage4 = new TabPage();
        TabPage tabPage5 = new TabPage();
        Label label1 = new Label();
        // Allows multiple rows of tabs in the tabControl1 tab strip.
        tabControl1.set_Multiline(true);
        tabControl1.set_SizeMode(TabSizeMode.FillToRight);
        tabControl1.set_Padding(new Point(15, 5));
        tabControl1.get_Controls().AddRange(new Control[] { tabPage1,
 tabPage2,
            tabPage3, tabPage4, tabPage5 });
        tabControl1.set_Location(new Point(35, 65));
        tabControl1.set_Size(new Size(220, 180));
        // Gets the number of rows currently in the tabControl1 tab
 strip.
        // Assigns int value to the rows variable.
        int rows = tabControl1.get_RowCount();

        label1.set_Text("There are " + ((System.Int32)rows).ToString()
 
            + " rows of tabs in the tabControl1 tab strip.");
        label1.set_Location(new Point(35, 25));
        label1.set_Size(new Size(220, 30));
        set_Size(new Size(300, 300));
        get_Controls().AddRange(new Control[] {label1, tabControl1
 });
    } //Form1

    public static void main(String[]
 args)
    {
        Application.Run(new Form1());
    } //main
} //Form1
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS