Link to home
Start Free TrialLog in
Avatar of chrisbray
chrisbrayFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How can I add a panel to an MDI form, but stop child forms being created behind it?

I have an MDI parent form with a MainMenu, a ToolStrip, and a StatusBar.  I want to add a panel to the left of the main form to host buttons (like the Outlook SideBar).

If I do not dock the panel child windows are created behind the panel.  If I do dock the panel the menu, tool strip and status bar move to the left of the panel.

I want the panel to be docked left in the space between the existing components, and to automatically adjust in size if any or all of those components are hidden.  Anyone got any suggestions?

Chris Bray
ASKER CERTIFIED SOLUTION
Avatar of Alexandre Simões
Alexandre Simões
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chrisbray

ASKER

Hi AlexCode:

That was the first thing I tried.  Makes no difference whatsoever...

Chris Bray
Hi AlexCode:

Following on from your suggestion I tried it again, and guess what?  This time it worked!!

Thanks, don't know why it didn't work when I tried it before... points are yours.

Chris Bray
Thanks,
it had to work as I have never had that kind of trouble between a panel and a toolstrip so I made a small test before actually posting the answer.

Cheers,
Alex
Hi AlexCode:

Well, I definitely tried it first....  I also tried removing and adding back the components because I have known that to solve z order problems too.  Nothing I tried worked so I posted the question, and when I tried it again after your advice it worked!

I must have done something different or done it in some other order - trouble is I don't know what.  Still, next time I will know to keep trying until it odes work.

Chris Bray