C# .NET Panels

Started by
4 comments, last by laztrezort 12 years ago
Hey,

I have quite a simple question to ask.
I have on the left side of my form buttons that change what the user is viewing.
On the right side I have 4 Panels on top of each other, when the user selects one of the left buttons it hides all the panels
except the one that the user selected.

The only problem is managing all of this is getting way out of hand. It's very difficult to keep clicking on which one I want
to modify and clicking bring to front and then sending it back.

Is there an easier way to full this off?

I was thinking a tab control if I could just make it draw the 3d border without the tab headers.


Thanks in advance:
CoderWalker
If this post was helpful please +1 or like it !

Webstrand
Advertisement
You can right click and use 'select <name>'.
[TheUnbeliever]
I mean is there a better control to handle this? Is this a bad idea?
If this post was helpful please +1 or like it !

Webstrand
The tab control is the correct solution. It's what users understand already, and it provides both the design-time editing and run-time behavior that you want.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Why do you not want to let the tab control be the tab control?

Why do you want to control the panels fron a different control? Need to understand more why you are doing it this way.
My guess is that you want to dynamically change the controls/layout at runtime, while still leveraging the editor as much as possible? I've used a tab control for doing something like this before, there is a way to hide the tab headers but IIRC it involves a bit of hackery. Google "winforms hiding tab control header" or similar and you should find a way to do so. Again, going by memory here, but I believe I found 2 ways to do this at the time, one involving resizing the tab control at runtime and another involving intercepting a specific windows message. Can't remember the details, sorry.

This topic is closed to new replies.

Advertisement