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.

적용 대상

추가 정보