Remove SplitContainer without removing other controls

I can't believe I couldn't find the answer to this question.

I no longer need to use SplitContainer in my WinForms UI. But whenever I remove the SplitContainer, I lose all my other controls - buttons, labels, text boxes and charts. Everything in the SplitContainer has been removed as well. Very annoying.

What's the best way to remove the SplitContainer control, but leave everything else in place?

A trivial example:

enter image description here

+3


source to share


1 answer


Make room on your form and drag controls to empty space.

Alternatively, go to View - Other Windows - Document and move the child controls out of the SplitContainer hierarchy.



enter image description here

Do not cut and paste as this will break the event handlers.

+4


source







All Articles