ListView: column width if View == List

  • Thread starter Thread starter jg
  • Start date Start date
J

jg

I am trying to adjust the width of a column when the View is set to "List"
in a ListView object. If the View is set to "Details", setting columns
widths is easy using the "ColumnHeader Collection Editor" (in Visual C#),
but for the "List" I cannot find something similar.

jg
 
Cannot be done. It is a workstation configuration item. In XP you would go
to the desktop settings / Advanced to set this. You cannot do this for just
one application that has different settings.

LLoyd SHeen
 
If I'm understanding this properly then this seems to work fine for me (Net
Fx 1.1). I've got a ListView with four items (added through the designer),
the View is set to List, and I have added a single column (also through the
designer). When the View is List it looks like the width for "columns" is
set based on the first column created.
 
Here's my problem with more detailed info:

If I start the ListView with View == LargeIcon and then switch to View ==
List, only about 4 characters of the ListItem text are shown, i.e. longer
strings are shown as "xx..." or something similar. Switching to View ==
Detail and performing a sort on any column and then switching back to View
== List shows all the text items without any abbreviation.

The text is also shown correctly if I start with View == List, but merely
switching Views (without sorting) doesn't change the "abbreviated" text
display.

It looks as if the column width is supposed to be computed automatically,
depending on the largest width of the text strings (as the Explorer does).
Sometimes it works, sometimes not as described above.

So far I was not able to trigger the correct correct column width
computation. I'd be happy if I could, but I'd also like to have the option
to explcitly set the width.

jg
 
Back
Top