Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. SplitContainer

SplitContainer

Scheduled Pinned Locked Moved C#
questionvisual-studiodockerhelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alpha_10
    wrote on last edited by
    #1

    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!

    S 1 Reply Last reply
    0
    • A alpha_10

      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!

      S Offline
      S Offline
      salysle
      wrote on last edited by
      #2

      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.

      A 1 Reply Last reply
      0
      • S salysle

        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.

        A Offline
        A Offline
        alpha_10
        wrote on last edited by
        #3

        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

        S 1 Reply Last reply
        0
        • A alpha_10

          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

          S Offline
          S Offline
          salysle
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups