Multiple Panels on a form

I have a form that I need to place multiple panels on. These panels will overlap each other and only one is visible at a time. I would like a way to easily switch between these panels in the designer. I have tried the following:

  1. TabControl: I wrote code to hide the tabs but it behaves odd on resize with the browser control. I also don't want the border around the panels.
  2. PanelManager: http://www.dotnetrix.co.uk/custom.html This one seemed the most promising but it has some bugs in VS2005 (and .NET 2.0) that make using the control in designer impossible.

I will continue to tweak the above to see if I can make one work for me but, are there any other possible ways to do this.

Thanks in advance.



Answer this question

Multiple Panels on a form

  • asalcedo

    Go to View\Other Windows\Document Outline.

    With that view you can change zorder, delete, move etc.



  • Marcelroos

    Hi, Adam

    First,

    You can try this:

    this.tabControl1.Dock = DockStyle.Fill;

    this.tabControl1.Region = new Region(new RectangleF(

    this.tabPage1.Left,

    this.tabPage1.Top,

    this.tabPage1.Width,

    this.tabPage1.Height));

    Switch the panels by tabPage1.Hide(); tabPage2.Show();

    And It looks quite good in design mode.

    Thank you



  • Multiple Panels on a form