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

Re: ListView: column width if View == List by Lloyd

Lloyd
Sun Jan 25 15:01:03 CST 2004

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

"jg" <J_Goettgens@hotmail.com> wrote in message
news:opr2cft406kpo3k3@news.t-online.de...
> 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



Re: ListView: column width if View == List by Tim

Tim
Sun Jan 25 15:30:07 CST 2004

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.

--
Tim Wilson
.Net Compact Framework MVP
{cf147fdf-893d-4a88-b258-22f68a3dbc6a}

"jg" <J_Goettgens@hotmail.com> wrote in message
news:opr2cft406kpo3k3@news.t-online.de...
> 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



Re: ListView: column width if View == List by jg

jg
Sun Jan 25 15:58:50 CST 2004

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