Question Layout

ynm

New member
Joined
Mar 21, 2011
Messages
1
Programming Experience
1-3
Hello VB.Net Community,

I am fairly new to .net, and am looking for the "best way" to accomplish a form layout I envision. I will do my best to explain. Attached is a sample screenshot of the left "menu" panel, and the right panels where I want to display my information.

layout.jpg

I want to be able to click on a button in the left panel, and have a panel on the right display information related to the button selected on the left. So if I have 3 buttons on the left panel, I will need 3 different sets of information on the right panel.

The way I am currently handling it is by having 3 panels on the right overlapping each other. When I click one button on the left, I set two panels visible property to False, and the one corresponding to the button selected to True.

This almost works for me. The problem is when I overlap the panels on top of each other. When I do this, my program thinks I am placing the panels inside of the other panels, instead of them being independent of each other. So it's as if there is one Parent panel, and two child panels put inside the parent. This is causing my visible properties to not have their intended affect.

So my question is, is there a "better" way to do this? I like the way Tab Components work. Each tab has it's own "workspace". I don't have to deal with visibles to hide or show components.

Thanks!
 
In View menu ('other windows') there's a Document Outline window available. Here you can move the panel out of its container, then set the location manually if needed (ie, if not docked).
To have separate workspace you can define and use UserControl instead of Panel.
There are several container controls (in Containers section of Toolbox) that may help in such layout, to get the split/flow and a container to dock in.
It is also possible to use a TabControl with tabs on the left: How to: Display Side-Aligned Tabs with TabControl
 
Back
Top