Add an expander (collapse/expand) to a Panel WinForm

aleroot picture aleroot · Sep 25, 2010 · Viewed 94.8k times · Source

I have a panel containing a DataGridView and 3 buttons at the bottom of a form. I want to add the possibility to expand and collapse this panel. Is there a way to do it in a Windows Forms application?

Has someone done something similar?

Answer

Bradley Smith picture Bradley Smith · Sep 25, 2010

The SplitContainer control has the ability to collapse one of its two panels. You could rig up a button to the Panel1Collapsed property.