Search code examples
c#winformstablelayoutpanelsplitcontainer

Winforms control combining best of both the SplitContainer and TableLayoutPanel


With a SplitContainer, the user can resize the two sides of the control. But it's only limited to two sections.

With a TableLayoutPanel you have unlimited rows and columns. Unfortunately, the user can't drag any of these sections around.

How can I have the best of boths worlds; the 'draggable-ness' of the middle bar in the SplitContainer and the ability to have more than 2x1 sections as the TableLayoutPanel allows?

If Winforms won't allow it, perhaps there's a commercial component out there? I know that I've seen this sort of advanced control in some non-.NET programs.


Solution

  • Embed another SplitContainer inside one half of the first one.

    Remember you can split horizontal as well as vertical. I am sure a lot of neat layouts can be generated that way.