SplitContainer.Panel1MinSize SplitContainer.Panel1MinSize SplitContainer.Panel1MinSize SplitContainer.Panel1MinSize Property

定義

左端または上端から見た分割線のピクセル単位の最短距離を設定を取得またはPanel1します。Gets or sets the minimum distance in pixels of the splitter from the left or top edge of Panel1.

public:
 property int Panel1MinSize { int get(); void set(int value); };
public int Panel1MinSize { get; set; }
member this.Panel1MinSize : int with get, set
Public Property Panel1MinSize As Integer

プロパティ値

Int32の左端または上端から見た分割線のピクセル単位の最短距離を表すPanel1します。An Int32 representing the minimum distance in pixels of the splitter from the left or top edge of Panel1. 既定値に関係なく 25 (ピクセル単位) は、Orientationします。The default value is 25 pixels, regardless of Orientation.

例外

指定した値は、印刷の向きに互換性がありません。The specified value is incompatible with the orientation.

次のコード例は、垂直方向の分割を示しています。 ここの最小サイズPanel1(左側のパネル) は、コンテナーの左端から見た分割線ができるまでの最短距離を 30 (ピクセル単位) に設定します。The following code example shows a vertical splitter where the minimum size of Panel1 (the left panel) is set to 30 pixels, which is now the minimum distance the splitter can be from the left edge of the container. 垂直方向の分割の他の基本的なプロパティも表示されます。Other basic properties of a vertical splitter are also shown. この例が示されている例の一部、SplitContainerクラス。This example is part of a larger example provided for the SplitContainer class.

// 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.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 = 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

注釈

使用して、Panel1MinSizeコンテナーの左端または上端に近すぎる移動から見た分割線を防ぐためにプロパティ。Use the Panel1MinSize property to prevent the splitter from moving too close to the left or top edge of the container. いくつかの表示領域を回避するなど、TreeView覆われているからです。For example, you might want to prevent some of the display area of a TreeView from being covered.

場合、OrientationプロパティはVertical(既定)、Panel1MinSizeの左端から見た分割線のピクセル単位の最小の距離を返しますPanel1します。If the Orientation property is Vertical (the default), Panel1MinSize returns the minimum distance in pixels of the splitter from the left edge of Panel1. 場合、OrientationプロパティはHorizontalPanel1MinSizeの上端から見た分割線のピクセル単位の最小の距離を返しますPanel1します。If the Orientation property is Horizontal, Panel1MinSize returns the minimum distance in pixels of the splitter from the top edge of Panel1.

適用対象

こちらもご覧ください