Implement a nice one autoresize mechanism for Listview columns?

Viewed 1368

I would like to add a decent AutoResize mechanism to my Listview but I don't know what to do.

I set the last column to Autoresize itselfs when the Form resizes:

Private Sub Form1_Resize(sender As Object, e As EventArgs) _
Handles MyBase.Resize

    ColumnDownload.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize)

End Sub

But this native autoresize method is so wrong because when I resize the application, the horizontal scrollbar is shown:

enter image description here

enter image description here

Ofcourse If I pick by myself with the mouse the last column separator to increase the column width then I want to see/use the horizontal scrollbar, but the framework autoresize just autoincreases the size displaying that horizontal scrollbar, is so ugly an uneficient there's no need to auto display that scrollbar when resizing the form!

The look that I would is just like JDownloader and all the nice programs has, an Autoresize that stops exactly on the start of the vertical scrollbar without showing the ugly horizontal scrollbar if not needed, for example like this:

enter image description here

I hope that you could understand my question.

EDIT:

'Magic solutions' such as these:

MyColumnHeader.Width = -2
MyColumnHeader.Width = -1

...Does the same. See good article here: http://visualbasic.about.com/od/quicktips/qt/ListViewQT.htm

Really all the Google search results about resizing a Listview in .NET are using that, any proportional resize or alternative, any decent auto resizer, incredible.

1 Answers
Related