Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MDI/Split Container Forms Question

Status
Not open for further replies.

jake007

Programmer
Jun 19, 2003
166
US
I would like to use a combination of Split Container/Child MDI forms for an app I am designing. The Main for Will contain a split container, the left side of which will contain navigation buttons. I want the right side to contain the forms that the user navigates to . The question is,. how do I get the child forms to dock inside the right side split container on the parent form?


John
 
I can't think of any way that is possible. Only a form can be an MDI parent. You could write code to make the child form line up with the split panel, but there is no way to default it to do so that I can think of.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
A thought might be to place your navigation buttons on a form and set it's Resize events to match the MDI's. All MDI child forms then set their lefts to match the Left + Width of the NavForm and their resize events to not allow the form to move over the buttons. Rather clunky and old school, but it's a way to achieve what you're looking for.

"If I were to wake up with my head sewn to the carpet, I wouldn't be more surprised than I am right now.
 
Actually, I think I found a way..

in the Load event of the child form:

Me.MdiParent = Form1
Form1.SplitContainer1.Panel2.Controls.Add(Me)

Seems to reside in the Right Panel just fine. I will have to test some functionality however.

John
 
Let us know what you find out... I'D to see how you make it work with out being so clumsy.

"If I were to wake up with my head sewn to the carpet, I wouldn't be more surprised than I am right now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top