ListView: column width if View == List

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
 
L

Lloyd Sheen

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
 
T

Tim Wilson

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.
 
J

jg

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
 

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