Home All Groups Group Topic Archive Search About

How can one select from overlapped panels in the form design View?

Author
18 Jan 2005 12:44 AM
Jim Brandley
I am building a Windows Form App that has a splitter in the client area,
treeview on the left, and panels on the right. Different classes of tree
nodes need different views. How can I cause the one I want to work on (say
add or remove a control) to pop to the top of the z order in the design
view? I have tried about everything I can think of, without success. Bring
to top and send to bottom do not seem to do what I expect. Google revealed
nothing. Any help would be much appreciated.
Author
19 Jan 2005 7:16 PM
Chris Dunaway
What I have done is, instead of using multiple panels, use a single
panel and for each view, I use a form with no caption and no border.

So for example,

you have a tree view on the left, a splitter in the middle, and a
single panel on the right side with docking set to fill.

Then in the code, when a particular node is selected for which you need
to display a view, just instantiate the form, set it's parent property
to the content panel and then show the form inside the panel.   Then to
edit a particular view, you can just edit the form.

An alternative would be to use a tab control and place it so the tabs
are outside the boundary of the panel, or use a tab control that
supports tab pages in which you can hide the tab.  The tab control in
the Magic library can do this, but the Magic library is not free.
Anyway, hope this gives you some ideas.

Chris
Are all your drivers up to date? click for free checkup

Author
19 Jan 2005 11:28 PM
Jim Brandley
Thanks for the tip! I'll try that. I started with a tab control, but that
didn't work well for the data with which I'm working.
Show quoteHide quote
"Chris Dunaway" <dunaw***@gmail.com> wrote in message
news:1106162170.449803.154690@z14g2000cwz.googlegroups.com...
> What I have done is, instead of using multiple panels, use a single
> panel and for each view, I use a form with no caption and no border.
>
> So for example,
>
> you have a tree view on the left, a splitter in the middle, and a
> single panel on the right side with docking set to fill.
>
> Then in the code, when a particular node is selected for which you need
> to display a view, just instantiate the form, set it's parent property
> to the content panel and then show the form inside the panel.   Then to
> edit a particular view, you can just edit the form.
>
> An alternative would be to use a tab control and place it so the tabs
> are outside the boundary of the panel, or use a tab control that
> supports tab pages in which you can hide the tab.  The tab control in
> the Magic library can do this, but the Magic library is not free.
> Anyway, hope this gives you some ideas.
>
> Chris
>
Author
20 Jan 2005 2:38 PM
Chris Dunaway
By the way:  be sure to set the Form's TopLevel property to false,
otherwise you wont be able to show it inside the panel.
Author
20 Jan 2005 3:21 PM
rogercnorris
I've worked on several programs like that, and I think the following
solution will suit your needs, with no need to recode anything:

1) Open your form in the Designer.

2) On the Properties panel, use the top ComboBox to select the panel
which you want to display.

3) Next, give input focus back to the form designer by clicking on the
tab for your form (even though it's already selected).

4) After the previous step, the "Bring to Front" toolbar button should
now be enabled.  Press this button to bring your selected Panel back to
the front of the Z-Order, so that you can work with it.
Hope that answers your question!
Author
23 Jan 2005 10:00 PM
Jim Brandley
Thanks for the feedback - I'll give it a try.

<rogercnor***@yahoo.com> wrote in message
Show quoteHide quote
news:1106234464.766486.313850@z14g2000cwz.googlegroups.com...
> I've worked on several programs like that, and I think the following
> solution will suit your needs, with no need to recode anything:
>
> 1) Open your form in the Designer.
>
> 2) On the Properties panel, use the top ComboBox to select the panel
> which you want to display.
>
> 3) Next, give input focus back to the form designer by clicking on the
> tab for your form (even though it's already selected).
>
> 4) After the previous step, the "Bring to Front" toolbar button should
> now be enabled.  Press this button to bring your selected Panel back to
> the front of the Z-Order, so that you can work with it.
> Hope that answers your question!
>
Author
26 Jan 2005 6:53 AM
Michael Wong
Have you tried the DockPanel library?
http://sourceforge.net/projects/dockpanelsuite/



Jim Brandley wrote:
Show quoteHide quote
> I am building a Windows Form App that has a splitter in the client area,
> treeview on the left, and panels on the right. Different classes of tree
> nodes need different views. How can I cause the one I want to work on (say
> add or remove a control) to pop to the top of the z order in the design
> view? I have tried about everything I can think of, without success. Bring
> to top and send to bottom do not seem to do what I expect. Google revealed
> nothing. Any help would be much appreciated.
>
>

Bookmark and Share