Tivie Tivie - 3 days ago 6
Vb.net Question

Table with 3 columns. How can I make the middle one autogrow?

This might sound a really simple issue but it's kind of driving me nuts.

I have a table with 3 columns. The first column has some numbers in labels. The second column has a ListView, and the 3rd column has some small buttons.

What I want is that when the user maximizes the window, the column that grows is the middle one and not the one in the right.

I've already set the 1st and 3rd columns to fixed size and the middle one to auto-size.I've docked the table in the form.

But whenever I maximize the window, the column that expands is actually the 3rd one and not the middle one.

Anyone knows how to overcome this small but troublesome problem?

Answer

Set AutoSize=True for the Table-Control, fixed size for Column 1 and 3 and 100% for Column2. Set the appropriate anchor property for every control(f.e. Top, Bottom, Left, Right for the ListView-Control).

Not tested, but i hope this will work or lead the right way.

Regards

Comments