ListView Last Column Width

J

Just Me

Listview is Docked=Fill

I set all column widths to -2 and it works as expected if the listview needs
to be too wide for the window. That is, I get an H-scrollbar and the columns
are the correct size.

However, if the window (and thus the listview) is wider that the listview
needs to be it makes the last column extra wide so that it fills the right
side of the window.

I guess that just the way it works but the wide column does not look good so
I thought I ask if anyone knows know to make the last column behave like the
rest of them?


Thanks
 
H

Herfried K. Wagner [MVP]

* " Just Me said:
I set all column widths to -2 and it works as expected if the listview needs
to be too wide for the window. That is, I get an H-scrollbar and the columns
are the correct size.

However, if the window (and thus the listview) is wider that the listview
needs to be it makes the last column extra wide so that it fills the right
side of the window.

Are you sure this is actually the column header? The column header bar
will always fill the complete width of the listview, regardless of the
total width of all column headers.
 
J

Just Me

It's the column header. Since the header text is right aligned it is quite
obviously the header.

The header ends exactly at the window edge.

Do you find that surprising?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top