views:

204

answers:

2

Greetings,

My tablelayout panel has one column and three rows. (one docked to Fill panel in each cell.)

now I would like to be able to hide/show the rows . I want only one row to be visible at any time ( based on a user selection of some radio buttons) and I want to to get resized so it fills all the area of the TableLayoutPanel.

How can I do that? any tohughts?

+1  A: 

So why did you use a TableLayoutPanel?

Just put three Panels on your form, fill in everyone the content of each row and set the Dock property of all three panels to Fill. Set two panels Visible = false and one to true.

If you like to see another panel, just make it visible and hide the other two (based on your radio button settings).

Oliver
+2  A: 

If rows in your TableLayoutPanel is autosized then hiding content panel will hide cell where panel placed too.

arbiter
thanks, it could hide the panel but not the Cell.. cell is still there? Am I missing something?
BDotA
@BDotA, are you sure that your row is autosized?
arbiter
well on in the properties box of TableLayoutPanel there was a "Rows" property, I clicked on it, another dialog opened. my rows were listed there. there was a CellType radio buttons options in there I think. so I clicked on each of my rows and selected AutoSize for it.... this is what I did.
BDotA