Docked panels and Z-order problem.

  • Thread starter Dominik Jeske via .NET 247
  • Start date
D

Dominik Jeske via .NET 247

Hallo.
I have two panels docked on the right of the form (p1 on the leftand p2 on the right) and I want third panel to slide from rightto left into a view between p1 and p2 (Just like SolutionExplorer window in Visual Studio ? if it is in auto hide modeits slides to left when mouse is over it), but when I put mythird panel on Controls list of the form, set it child indexbetween those two and start to slide I have opposite effect ?the p1 is visible and p2 is hidden ? it is a way to do thisright ???
 
J

Jeff Gaines

Hallo.
I have two panels docked on the right of the form (p1 on the left and
p2 on the right) and I want third panel to slide from right to left
into a view between p1 and p2 (Just like Solution Explorer window in
Visual Studio ? if it is in auto hide mode its slides to left when
mouse is over it), but when I put my third panel on Controls list of
the form, set it child index between those two and start to slide I
have opposite effect ? the p1 is visible and p2 is hidden ? it is a
way to do this right ???

Dominik

It can be quite difficult to change the docking once you have added the
panels to a form!

It may be easier to have all three panels on the form, docked to the
right, then just change the width of the panel you want to show/hide
(you can do this in a loop if you want it to 'grow' or 'shrink').

To change the docking order and add a panel I would:

1: Change the properties of the left panel to no docking
2: Change the properties of the right panel to no docking
3: Add the third panel (if you haven't already)
4: Select the right most panel, select Format | Order | Bring to Front
5: Change the docking to right
6: Select the middle panel, select Format | Order | Bring to Front
7: Change the docking to right
8: Select the left panel, select Format | Order | Bring to Front
9: Change the docking to right

Now you can achieve what you want by changing the width of the panel
you want to slide in and out.

There is an add on called control outline which makes things easier and
which will be built in to the next version.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top