SplitContainer.Orientation SplitContainer.Orientation SplitContainer.Orientation SplitContainer.Orientation Property

定義

SplitContainer パネルが水平方向であるか垂直方向であるかを示す値を取得または設定します。Gets or sets a value indicating the horizontal or vertical orientation of the SplitContainer panels.

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

プロパティ値

Orientation 値のいずれか 1 つ。One of the Orientation values. 既定値は、Vertical です。The default is Vertical.

例外

代入された値が、Orientation 値ではありません。The assigned value is not one of the Orientation values.

次のコード例は、上部と下部のパネルにコントロールがListView含まれている水平スプリッターを示しています。The following code example shows a horizontal splitter whose top and bottom panels contain ListView controls. 水平スプリッターのその他の基本プロパティも表示されます。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を垂直から水平または水平から垂直に変更します。 OrientationUse the Orientation property to change the SplitContainer from vertical to horizontal or from horizontal to vertical.

適用対象

こちらもご覧ください