.NET Forms: how to make tree-menu with frame pages

andy7789
andy7789 used Ask the Experts™
on
Hi X-perts,

I need to make a page with a tree-like menu on the left and changeable pages on the right - similar to the Settings menu of the Visual Studio.

what is the easiest way of doing this?

I am thinking about setting a TreeView control with clickable events to show/hide Panels placed to the same position

Are there any better ways of doing this?

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Randy Wilson.Net Developer

Commented:
Use of the MultiView and a series of View controls will facilitate the right side panel switching.  Otherwise you are probably on the right track.  

Author

Commented:
As far as I know there is no MultiView control for windows form. I think Panel control is the closest.

Correct?

Author

Commented:
If i use Panels, is there a way to hide/show them on the Form design canvas? since they all are placed in the same position, it is difficult to design their controls
Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
There is another problem with TreeView: I cannot assign onclick events to the nodes
Randy Wilson.Net Developer

Commented:
Sorry, wasn't paying attention.  Don't do Windows forms, only ASP.Net.
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009
Commented:
Design the different "screens" as separate FORMS (or UserControls possibly)...then display them in ONE Panel at run-time as borderless, docked forms:

        Dim f2 As New Form2
        f2.FormBorderStyle = Windows.Forms.FormBorderStyle.None
        f2.Dock = DockStyle.Fill
        f2.TopLevel = False ' <--- will NOT work w/o this!
        Panel1.Controls.Clear()
        Panel1.Controls.Add(f2)
        f2.Show()

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial