Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delete a SplitContainer without deleting other controls

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

I no longer need to use a SplitContainer in my WinForms UI. But whenever I delete the SplitContainer, I lose all of my other controls too -- buttons, labels, textboxes, and charts. Anything that was in the SplitContainer is deleted as well. Very annoying.

What is the best way to remove a SplitContainer control but leave everything else in place?

Trivial Example:

enter image description here

like image 959
AndrewRalon Avatar asked Sep 30 '14 16:09

AndrewRalon


People also ask

What is the splitcontainer control?

The SplitContainer control lets you create complex user interfaces; often, a selection in one panel determines what objects are shown in the other panel. This arrangement is very effective for displaying and browsing information.

What happens when I remove a splitcontainer from my WinForms UI?

I no longer need to use a SplitContainer in my WinForms UI. But whenever I delete the SplitContainer, I lose all of my other controls too -- buttons, labels, textboxes, and charts. Anything that was in the SplitContainer is deleted as well.

How do I remove child controls from a split container?

Make room on your form and drag those controls into the empty space. Alternatively, go to View - Other Windows - Document Outline and move the child controls out of the SplitContainer's hierarchy. Do not cut and paste since that will sever your event handlers.

What is the use of split panel?

Having two panels allow you to aggregate information in areas, and the bar, or "splitter," makes it easy for users to resize the panels. Introduces the SplitContainer control and describes the commonly used properties, methods, and events. Describes how to control the splitter within the SplitContainer control.


1 Answers

Make room on your form and drag those controls into the empty space.

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

enter image description here

Do not cut and paste since that will sever your event handlers.

like image 152
LarsTech Avatar answered Oct 05 '22 14:10

LarsTech