SplitContainer.FixedPanel 屬性

定義

取得或設定當調整容器的大小時要維持相同大小的 SplitContainer 面板。Gets or sets which SplitContainer panel remains the same size when the container is resized.

public:
 property System::Windows::Forms::FixedPanel FixedPanel { System::Windows::Forms::FixedPanel get(); void set(System::Windows::Forms::FixedPanel value); };
public System.Windows.Forms.FixedPanel FixedPanel { get; set; }
member this.FixedPanel : System.Windows.Forms.FixedPanel with get, set
Public Property FixedPanel As FixedPanel

屬性值

FixedPanel 的其中一個值。One of the values of FixedPanel. 預設值為 NoneThe default value is None.

例外狀況

指派的值不是其中一個 FixedPanel 值。The assigned value is not one of the FixedPanel values.

範例

下列程式碼範例顯示的水準分隔器,其頂端面板已定義為 FixedPanel,因此不會隨著容器調整大小。The following code example shows a horizontal splitter whose top panel is defined as a FixedPanel so that it does not resize along with the container. 也會顯示水準分隔器的其他基本屬性。Other basic properties of a horizontal splitter are also shown. 這個範例是針對 SplitContainer 類別提供的較大範例的一部分。This example is part of a larger example provided for the SplitContainer class.

// Basic SplitContainer properties.
// This is a horizontal splitter whose top and bottom panels are ListView controls. The top panel is fixed.
splitContainer2->Dock = System::Windows::Forms::DockStyle::Fill;

// The top panel remains the same size when the form is resized.
splitContainer2->FixedPanel = System::Windows::Forms::FixedPanel::Panel1;
splitContainer2->Location = System::Drawing::Point( 0, 0 );
splitContainer2->Name = "splitContainer2";

// Create the horizontal splitter.
splitContainer2->Orientation = System::Windows::Forms::Orientation::Horizontal;
splitContainer2->Size = System::Drawing::Size( 207, 273 );
splitContainer2->SplitterDistance = 125;
splitContainer2->SplitterWidth = 6;

// splitContainer2 is the third control in the tab order.
splitContainer2->TabIndex = 2;
splitContainer2->Text = "splitContainer2";

// Basic SplitContainer properties.
// This is a horizontal splitter whose top and bottom panels are ListView controls. The top panel is fixed.
splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
// The top panel remains the same size when the form is resized.
splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
splitContainer2.Location = new System.Drawing.Point(0, 0);
splitContainer2.Name = "splitContainer2";
// Create the horizontal splitter.
splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
splitContainer2.Size = new System.Drawing.Size(207, 273);
splitContainer2.SplitterDistance = 125;
splitContainer2.SplitterWidth = 6;
// splitContainer2 is the third control in the tab order.
splitContainer2.TabIndex = 2;
splitContainer2.Text = "splitContainer2";
' Basic SplitContainer properties.
' This is a horizontal splitter whose top and bottom panels are ListView controls. The top panel is fixed.
splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill
' The top panel remains the same size when the form is resized.
splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1
splitContainer2.Location = New System.Drawing.Point(0, 0)
splitContainer2.Name = "splitContainer2"
' Create the horizontal splitter.
splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal
splitContainer2.Size = New System.Drawing.Size(207, 273)
splitContainer2.SplitterDistance = 125
splitContainer2.SplitterWidth = 6
' splitContainer2 is the third control in the tab order.
splitContainer2.TabIndex = 2
splitContainer2.Text = "splitContainer2"

備註

使用此屬性指定當使用者調整容器大小時,哪一個 SplitContainer 面板會保持相同的大小。Use this property to specify which SplitContainer panel stays the same size when a user resizes the container.

適用於

另請參閱