SplitContainer
-
Hi everyone. I have to develop an MDI app and in the main window I want to put a sizable panel on the left (like Solution Explorer in VS). So I created a SplitContainer (in which there is an other splitContainer) and set it vertical and "Dock = Left". My problem is that while internal panels are sizable, the container itself isn't sizable (so it has the right border fixed) and it stands fixed in a portion of my main window. How can i make the splitcontainer sizable? otherwise: is there a workaround (such as other controls instead of splitContainer)? thanks!
-
Hi everyone. I have to develop an MDI app and in the main window I want to put a sizable panel on the left (like Solution Explorer in VS). So I created a SplitContainer (in which there is an other splitContainer) and set it vertical and "Dock = Left". My problem is that while internal panels are sizable, the container itself isn't sizable (so it has the right border fixed) and it stands fixed in a portion of my main window. How can i make the splitcontainer sizable? otherwise: is there a workaround (such as other controls instead of splitContainer)? thanks!
Use two split container controls; drop one on the form and set its dock property to fill, then drop another one in the left hand panel of the first split container and set its dock property to fill also but set its orientation property to horizontal. The main container and the subordinate container will adjust to fill the window during use and in response to resizing the form. You can still adjust the size of the panels by moving the splitter bars up and down or left and right.
-
Use two split container controls; drop one on the form and set its dock property to fill, then drop another one in the left hand panel of the first split container and set its dock property to fill also but set its orientation property to horizontal. The main container and the subordinate container will adjust to fill the window during use and in response to resizing the form. You can still adjust the size of the panels by moving the splitter bars up and down or left and right.
Hi, thanks for replying me. I've already tried this way, but using 2 splitContainers and setting one with Dock = Fill, opening a child window of the MDI container this is not visible because it appears (hide) under the container. the problem is that my application should have a left panel as described before, but the rest of the main window shoud not be tabbed (as VS), but free for child windows. any other suggestions? -- modified at 4:25 Monday 23rd October, 2006
-
Hi, thanks for replying me. I've already tried this way, but using 2 splitContainers and setting one with Dock = Fill, opening a child window of the MDI container this is not visible because it appears (hide) under the container. the problem is that my application should have a left panel as described before, but the rest of the main window shoud not be tabbed (as VS), but free for child windows. any other suggestions? -- modified at 4:25 Monday 23rd October, 2006
Hello, Oh, the issue is with the MDI parent. Here is a solution: 1. Get rid of the split containers altogether. 2. Add a panel to the MDI form 3. Dock the panel to the left side 4. Drop a splitter control (not the split container, just the splitter) to the right of the panel. 5. Put a panel inside the left docked panel. 6. Dock this new panel to the top. 7. Drop another control beneath the new panel. 8. Dock the splitter control to the top. 9. Drop another panel under the new splitter control. 10. Dock the new panel to the full extent. This will give you two panels that will adjust in size on the left hand side, you can put whatever controls you want to inside those panels. This also leaves the MDI form clear to accept adding forms to it. I tested this and it works fine for both the splitters and as an MDI parent. If you have any additional problems with this, I would be glad to send you a working copy of it; just email me an address and I will forward it along. Scott Lysle