Share via


AutoLayout by Examples - Part 3 - Dialog 7

Dialog 7: Dialog containing two splitter-separated side-by-side lists

 

Project Name: SideBySideListsVerticalSplitter.csproj. Download source.

 

Characteristics:

  • Two side-by-side lists separated by a splitter
  • Fully collapsible left panel (i.e. the tree view)

 

Screen Shots:

 

 

 

 

Designer Layout:

 

Document Outline:

 

Key Notes:

  • Hiding and showing the tree view is accomplished by toggling the Panel1Collapsed property of the split container. Download source.

 

        private void ToggleTreeVisibility()

        {

            overarchingLayoutPanel.SuspendLayout();

            splitContainer.SuspendLayout();

            splitContainer.Panel1Collapsed = !splitContainer.Panel1Collapsed;

            buttonShow.Enabled = splitContainer.Panel1Collapsed;

            buttonHide.Enabled = !splitContainer.Panel1Collapsed;

            splitContainer.ResumeLayout(true);

            overarchingLayoutPanel.ResumeLayout(true);

        }

 

 

 

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included

script samples are subject to the terms specified at https://www.microsoft.com/info/cpyright.htm

Comments

  • Anonymous
    March 08, 2006
    Samples
    A companion of this document is the actual source code of a Visual Studio solution (AutoLayoutByExamples.sln)...