views:

41

answers:

1

when I drop a Listbox in a cell of a TableLayout, it has the properties for ColumnSpan and RowSpan ... but when I go to the code and want to say " listBox1.RowSpan " there is not such a property :( I want to do this because sometimes in my program I want this listbox to take one cell and sometimes I want it to take two cells. so How can I do that?

+2  A: 

In order to change the RowSpan programmatically, you have to do the following:

tableLayoutPanel1.SetRowSpan(listBox1, 2);

And put the desired number of rows where I put the 2.

kevev22