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

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

SplitContainer.Dock プロパティ

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

コンテナの端に結合する SplitContainer の境界線取得または設定します

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

Dim instance As SplitContainer
Dim value As DockStyle

value = instance.Dock

instance.Dock = value
public DockStyle Dock { get; set;
 }
public:
property DockStyle Dock {
    DockStyle get ();
    void set (DockStyle value);
}
/** @property */
public DockStyle get_Dock ()

/** @property */
public void set_Dock (DockStyle value)

プロパティ
DockStyle 値の 1 つ既定値None です。

解説解説

SplitContainerコンテナ任意の端にドッキングしたり、SplitContainerコンテナすべての端にドッキングしSplitContainerコンテナ全体表示したできます。たとえば、このプロパティを DockStyle.Left に設定すると、SplitContainer左端コンテナ左端結合されます。コントロールz オーダー基づいてドッキングされます

メモメモ

z オーダー画面深度対応しx オーダーと y オーダーそれぞれ横の寸法と縦の寸法対応しますz オーダーは、コントロールまたはウィンドウ画面上で重なったり、同じ領域配置されたりする可能性がある場合に、オブジェクト重なり順序定義しますz オーダーの一番上にあるコントロールウィンドウは、他のすべてのコントロールウィンドウの上表示されControls プロパティにおいてインデックス 0 で参照されます。z オーダーの一番下にあるコントロールウィンドウは、他のすべてのコントロールウィンドウの下に表示されControls プロパティにおいてインデックス (Controls.Count-1)参照されます。

コントロール固定およびドッキング詳細については、「方法 : Windows フォームでマルチペイン ユーザー インターフェイス作成する」を参照してください

使用例使用例

次のコード例では、Dock プロパティFill設定された垂直方向の分割線を示しますまた、直方向の分割線の他の基本的なプロパティ示します。このコード例は、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.Dock プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からSplitContainer.Dock プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からSplitContainer.Dock プロパティ を検索

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS