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:
+3
AndrewRalon
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.
Do not cut and paste as this will break the event handlers.
+4
LarsTech
source
to share