By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,524 Members | 1,589 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,524 IT Pros & Developers. It's quick & easy.

ListView Last Column Width

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
* " Just Me" <ne********@a-znet.com> scripsit:
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.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2

P: n/a
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?
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uv**************@tk2msftngp13.phx.gbl...
* " Just Me" <ne********@a-znet.com> scripsit:
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.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.