Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

How to: Split a Window Horizontally

.NET Framework 3.0

The following code example makes the splitter that divides the SplitContainer control horizontal.

NoteNote

The Orientation property of the SplitContainer control determines the direction of the splitter, not of the control itself.

To split a window horizontally

  • Within a procedure, set the Orientation property of the SplitContainer control to Horizontal.

    Sub ShowSplitContainer()
        Dim splitContainer1 as new SplitContainer()
        splitContainer1.BorderStyle = BorderStyle.Fixed3D
        splitContainer1.Location = New System.Drawing.Point(74, 20)
        splitContainer1.Name = "DemoSplitContainer"
        splitContainer1.Size = New System.Drawing.Size(212, 435)
        splitContainer1.TabIndex = 0
        splitContainer1.Orientation = Orientation.Horizontal
        Controls.Add(splitContainer1)
    End Sub
    
    

    public void showSplitContainer()
    {
        SplitContainer splitContainer1 = new SplitContainer ();
        splitContainer1.BorderStyle = BorderStyle.Fixed3D;
        splitContainer1.Location = new System.Drawing.Point (74, 20);
        splitContainer1.Name = "DemoSplitContainer";
        splitContainer1.Size = new System.Drawing.Size (212, 435);
        splitContainer1.TabIndex = 0;
        splitContainer1.Orientation = Orientation.Horizontal;
        this.Controls.Add (splitContainer1);
    
    }
    

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.