ComponentOne SplitContainer for WinForms
SplitContainer Layout / SplitContainer Layout Options
In This Topic
    SplitContainer Layout Options
    In This Topic

    The default C1SplitContainer has a simple horizontal layout. The horizontal layout has one panel with a header. The default C1SplitterPanel appears docked to the top. When another C1SplitterPanel is added it appears below the initial C1SplitterPanel.


    The C1SplitterPanel’s layout can easily be controlled by the Dock property. The C1SplitterPanel’s can be docked to the top, left, right or bottom on the container that the C1SplitterPanel has been assigned to.

    Use the Dock property to define how a C1SplitterPanel is automatically resized as its parent control is resized. For example, setting the Dock to Left causes the panel to align itself with the left edges of its parent control and to resize as the parent control is resized. If Left, Right, Top, or Bottom is selected, the specified and opposite edges of the control are resized to the size of the containing C1SplitContainer's corresponding edges.

    The PanelDockStyle settings are:

    Member Name Description
    Top The C1SplitterPanel’s top edge is docked to the top of its containing C1SplitContainer.
    Bottom The C1SplitterPanel’s bottom edge is docked to the bottom of its containing C1SplitContainer.
    Left The C1SplitterPanel’s left edge is docked to the left edge of its containing C1SplitContainer.
    Right The C1SplitterPanel’s right edge is docked to the right edge of its containing C1SplitContainer.

    The last visible panel in the Panels collection is the special case. It always behaves as if its Dock property is set to Fill (all four sides of the control are resized to match the containing control’s edges). Values of the following properties are ignored for the last visible panel: Collapsible, ResizeWhileDragging, Dock, SizeRatio, KeepRelativeSize, and Resizable. Also, an attempt to change the Widthh or the Height property of such a panel has no visible effect. If this panel becomes not the last, or if any of the subsequent panels becomes visible, all the mentioned properties start to work as one may expect.

    C1SplitterPanel’s Dock property makes it easy to create the following splits in the C1SplitContainer:

    See Also