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

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

SplitContainer.SplitterWidth プロパティ

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

分割線の幅をピクセル単位取得または設定します

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

<LocalizableAttribute(True)> _
Public Property SplitterWidth As
 Integer
Dim instance As SplitContainer
Dim value As Integer

value = instance.SplitterWidth

instance.SplitterWidth = value
[LocalizableAttribute(true)] 
public int SplitterWidth { get;
 set; }
[LocalizableAttribute(true)] 
public:
property int SplitterWidth {
    int get ();
    void set (int value);
}
/** @property */
public int get_SplitterWidth ()

/** @property */
public void set_SplitterWidth (int
 value)
public function get SplitterWidth
 () : int

public function set SplitterWidth
 (value : int)

プロパティ
分割線の幅をピクセル単位表した System.Int32。既定値は 4 ピクセルです。

例外例外
例外種類条件

ArgumentOutOfRangeException

値が 1 未満であるか、方向適合しません。

解説解説

SplitterWidth プロパティ使用すると、SplitContainer ではなく分割自体の幅を変更できます

使用例使用例

直方向の分割線の初期幅を 6 ピクセル (既定値) とするよう指定するコード例次に示しますまた、直方向の分割線の他の基本的なプロパティ示します。このコード例は、SplitContainer クラストピック取り上げているコード例一部分です。

' Basic SplitContainer properties.
' This is a vertical splitter that moves in 10-pixel increments.
' This splitter needs no explicit Orientation property because Vertical
 is the default.
splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
splitContainer1.ForeColor = System.Drawing.SystemColors.Control
splitContainer1.Location = New System.Drawing.Point(0, 0)
splitContainer1.Name = "splitContainer1"
' You can drag the splitter no nearer than 30 pixels from the left edge
 of the container.
splitContainer1.Panel1MinSize = 30
' You can drag the splitter no nearer than 20 pixels from the right
 edge of the container.
splitContainer1.Panel2MinSize = 20
splitContainer1.Size = New System.Drawing.Size(292, 273)
splitContainer1.SplitterDistance = 79
' This splitter moves in 10-pixel increments.
splitContainer1.SplitterIncrement = 10
splitContainer1.SplitterWidth = 6
' splitContainer1 is the first control in the tab order.
splitContainer1.TabIndex = 0
splitContainer1.Text = "splitContainer1"
  
' Add a TreeView control to the left panel.
splitContainer1.Panel1.BackColor = System.Drawing.SystemColors.Control
' Add a TreeView control to Panel1.
splitContainer1.Panel1.Controls.Add(treeView1)
splitContainer1.Panel1.Name = "splitterPanel1"
' Controls placed on Panel1 support right-to-left fonts.
splitContainer1.Panel1.RightToLeft = System.Windows.Forms.RightToLeft.Yes
// Basic SplitContainer properties.
// This is a vertical splitter that moves in 10-pixel increments.
// This splitter needs no explicit Orientation property because Vertical
 is the default.
splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
splitContainer1.ForeColor = System.Drawing.SystemColors.Control;
splitContainer1.Location = new System.Drawing.Point(0, 0);
splitContainer1.Name = "splitContainer1";
// You can drag the splitter no nearer than 30 pixels from the left
 edge of the container.
splitContainer1.Panel1MinSize = 30;
// You can drag the splitter no nearer than 20 pixels from the right
 edge of the container.
splitContainer1.Panel2MinSize = 20;
splitContainer1.Size = new System.Drawing.Size(292, 273);
splitContainer1.SplitterDistance = 79;
// This splitter moves in 10-pixel increments.
splitContainer1.SplitterIncrement = 10;
splitContainer1.SplitterWidth = 6;
// splitContainer1 is the first control in the tab order.
splitContainer1.TabIndex = 0;
splitContainer1.Text = "splitContainer1";
// When the splitter moves, the cursor changes shape.
splitContainer1.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(splitContainer1_SplitterMoved);
splitContainer1.SplitterMoving += new System.Windows.Forms.SplitterCancelEventHandler(splitContainer1_SplitterMoving);

// Add a TreeView control to the left panel.
splitContainer1.Panel1.BackColor = System.Drawing.SystemColors.Control;
// Add a TreeView control to Panel1.
splitContainer1.Panel1.Controls.Add(treeView1);
splitContainer1.Panel1.Name = "splitterPanel1";
// Controls placed on Panel1 support right-to-left fonts.
splitContainer1.Panel1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;

// Basic SplitContainer properties.
// This is a vertical splitter that moves in 10-pixel increments.
// This splitter needs no explicit Orientation property because Vertical
 is the default.
splitContainer1->Dock = System::Windows::Forms::DockStyle::Fill;
splitContainer1->ForeColor = System::Drawing::SystemColors::Control;
splitContainer1->Location = System::Drawing::Point( 0, 0 );
splitContainer1->Name = "splitContainer1";

// You can drag the splitter no nearer than 30 pixels from the left
 edge of the container.
splitContainer1->Panel1MinSize = 30;

// You can drag the splitter no nearer than 20 pixels from the right
 edge of the container.
splitContainer1->Panel2MinSize = 20;
splitContainer1->Size = System::Drawing::Size( 292, 273 );
splitContainer1->SplitterDistance = 79;

// This splitter moves in 10-pixel increments.
splitContainer1->SplitterIncrement = 10;
splitContainer1->SplitterWidth = 6;

// splitContainer1 is the first control in the tab order.
splitContainer1->TabIndex = 0;
splitContainer1->Text = "splitContainer1";

// When the splitter moves, the cursor changes shape.
splitContainer1->SplitterMoved += gcnew System::Windows::Forms::SplitterEventHandler(
 this, &Form1::splitContainer1_SplitterMoved );
splitContainer1->SplitterMoving += gcnew System::Windows::Forms::SplitterCancelEventHandler(
 this, &Form1::splitContainer1_SplitterMoving );

// Add a TreeView control to the left panel.
splitContainer1->Panel1->BackColor = System::Drawing::SystemColors::Control;

// Add a TreeView control to Panel1.
splitContainer1->Panel1->Controls->Add( treeView1 );
splitContainer1->Panel1->Name = "splitterPanel1";

// Controls placed on Panel1 support right-to-left fonts.
splitContainer1->Panel1->RightToLeft = System::Windows::Forms::RightToLeft::Yes;

// Basic SplitContainer properties.
// This is a vertical splitter that moves in 10-pixel increments.
// This splitter needs no explicit Orientation property because 
// Vertical is the default.
splitContainer1.set_Dock(System.Windows.Forms.DockStyle.Fill);
splitContainer1.set_ForeColor(System.Drawing.SystemColors.get_Control());
splitContainer1.set_Location(new System.Drawing.Point(0, 0));
splitContainer1.set_Name("splitContainer1");

// You can drag the splitter no nearer than 30 pixels from the 
// left edge of the container.
splitContainer1.set_Panel1MinSize(30);

// You can drag the splitter no nearer than 20 pixels from the 
// right edge of the container.
splitContainer1.set_Panel2MinSize(20);
splitContainer1.set_Size(new System.Drawing.Size(292, 273));
splitContainer1.set_SplitterDistance(79);

// This splitter moves in 10-pixel increments.
splitContainer1.set_SplitterIncrement(10);
splitContainer1.set_SplitterWidth(6);

// splitContainer1 is the first control in the tab order.
splitContainer1.set_TabIndex(0);
splitContainer1.set_Text("splitContainer1");

// When the splitter moves, the cursor changes shape.
splitContainer1.add_SplitterMoved(new System.Windows.Forms.
    SplitterEventHandler(splitContainer1_SplitterMoved));
splitContainer1.add_SplitterMoving(new System.Windows.Forms.
    SplitterCancelEventHandler(splitContainer1_SplitterMoving));

// Add a TreeView control to the left panel.
splitContainer1.get_Panel1().set_BackColor(System.Drawing.SystemColors.
    get_Control());

// Add a TreeView control to Panel1.
splitContainer1.get_Panel1().get_Controls().Add(treeView1);
splitContainer1.get_Panel1().set_Name("splitterPanel1");

// Controls placed on Panel1 support right-to-left fonts.
splitContainer1.get_Panel1().set_RightToLeft(System.Windows.Forms.
    RightToLeft.Yes);
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

「SplitContainer.SplitterWidth プロパティ」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS