Reputation: 31845
Calling MyPanel.Panel1.Hide(); or MyPanel.Panel2.Hide(); simply hides the controls inside the panel... but I want to have the other side of the panel fill up the whole space.
So, if I hide Panel1, I want Panel2 to take up the whole space, and I want the splitter to disappear. Is that possible, if so, how?
Upvotes: 3
Views: 1914
Reputation: 31406
To hide one of the panels you can call
MyPanel.Panel1Collapsed = true; // or Panel2Collapsed
If Panel2 was collapsed, it will toggle its state to be shown after this call.
Upvotes: 2
Reputation: 10074
Use MyPanel.Panel1Collapsed = true;
to collapse Panel1 (likewise for panel2).
Upvotes: 5