SplitContainer.Panel2MinSize プロパティ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Dim instance As SplitContainer Dim value As Integer value = instance.Panel2MinSize instance.Panel2MinSize = value
[LocalizableAttribute(true)] public: property int Panel2MinSize { int get (); void set (int value); }
/** @property */ public int get_Panel2MinSize () /** @property */ public void set_Panel2MinSize (int value)
分割線から Panel2 の右端または下端までの最短距離をピクセル単位で表す Int32。既定値は、Orientation に関係なく 25 ピクセルです。


Panel2MinSize プロパティを使用すると、分割線とコンテナの右端または下端が近づき過ぎないようにできます。たとえば、TreeView の一部の表示領域が隠れないようにする場合などが考えられます。
Orientation プロパティが Vertical (既定) である場合、Panel2MinSize は、分割線と Panel2 の右端との最短距離をピクセル単位で返します。Orientation プロパティが Horizontal である場合、Panel2MinSize は、分割線と Panel2 の下端との最短距離をピクセル単位で返します。

次のコード例では、Panel2 (右側パネル) の最小サイズが 20 ピクセルに設定された垂直方向の分割線を示します。このピクセル数は、分割線とコンテナの右端との最短距離です。また、垂直方向の分割線の他の基本的なプロパティも示します。このコード例は、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);

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からSplitContainer.Panel2MinSize プロパティを検索する場合は、下記のリンクをクリックしてください。

- SplitContainer.Panel2MinSize プロパティのページへのリンク