1
votes

I am trying to establish the following behavior: When hiding the bottom (blue) panel I want the top (red) panel to stretch to replace it vertically and vice versa (hiding red panel should expand blue).

Using a table layout panel with auto sized rows I was able to get the blue to stretch upwards but I can not get the red panel to grow downwards.

enter image description here

It's difficult to see from the far right picture but the bottom table row did not shrink with the panel. Table layout panel is not a requirement for me but I was hoping it would offer a solution.

1
TLP will certainly do this. Just delete the row.Hans Passant

1 Answers

0
votes

Try using a SplitContainer control instead.

You can control each panel's visibility with the Collapsed properties:

splitContainer1.Panel1Collapsed = true;

or

splitContainer1.Panel2Collapsed = true;