msgbartop
msgbarbottom

18 Aug 09 VB.Net: MDI, Splitter and Splitcontainer

windowsapplication1First of all, I have not had good experience with Splitcontainer in MDI. I was unable to load a child form in the splitconainer panel. I have googled it, but found it very awkward. Some one even reported that the menu would get messed up even if you somewhat cheated the splitcontainer to make it take the child form.

So, splitter comes to rescue. My way of doing it is as follows:

  1. Insert a panel in the MDI, DOCK it to the left or right. This is a very important step.
  2. Insert a splitter control, and dock it left or right, as the same of the panel.
  3. Put your controls, e.g. buttons, trees, in your panel, and ANCHOR it to at least left AND right, so your controls will move along with the panel when you move the splitter.
  4. Assign a Minimum width to the panel if desired.

Below is the sample application.

windowsapplication1

Tags: ,



Leave a Comment

You must be logged in to post a comment.