473,406 Members | 2,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

ListView Last Column Width

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
2 2502
* " 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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Geert-Pieter Hof | last post by:
Hello, I use a ListView control (report view) to show the user a summary of error messages. The width of the column that holds the error messages is such that no horizontal scrollbar is needed....
2
by: John Lauwers | last post by:
I know you can edit the first column of the listview control, is there a way to edit the second and/or the other columns? greets John
6
by: VM | last post by:
How can I fill up a listview with text file contents? My listview has two columns and the first column fills up with a while loop: while (myString != null) { myString = sr.Readline();...
2
by: Sean | last post by:
Hi all, I wonder if there is a way to prevent user from resizing the last column by moving the last vertical line on a ListView, meaning I don't want user to be able to move the last vertical...
12
by: Dennis | last post by:
I have a form which has a ListView control named ListView1 added at design time. When I add items using the following code, they don't appear in the list view. However, if I create a ListView...
12
by: J L | last post by:
When I fill a listview, I resize the columns to fit the data. I need to know if the data will fit vertically or if there will be a vertical scroll bar. I need to know this so I can allow for it on...
6
by: Maileen | last post by:
Hi, I have a listview in report mode. I have 3 columns in this listview and 1 column i would like to hide it from user's view. i tried to give width = 0 but user is still able to resize column...
1
by: Kimmo Laine | last post by:
Hi! I need to resize the last column in my listview control so that there won´t be horizontal scrollbar. Lets first create lv and add some items: listView1.View = View.Details;
2
by: =?iso-8859-1?B?S2VyZW0gR/xtcvxrY/w=?= | last post by:
Hi, i know how to work with the owner draw mode in the ListView-Class, but how do i draw the last three dots in a column if the text exceeds the columns width? To make it clear, i am talking...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.