Listview column length problems

S

Soeren D.

I have a strange problem with listview. When I adjust my column sizes in the
designer, it doesnt reflect the column sizes when the listview is shown (in
a fixed size window). I have to use trial and error to get it right.

Finally, I would expect the last column to fill out the remaining part of
the listview (it does not have a horizontal scrollbar), but I cant figure
that one out either.

Do you know what I am doing wrong? I use Visual C# Express.

Thanks in advance.

Best regards
Soeren
 
O

Oliver Sturm

Hello Soeren,
I have a strange problem with listview. When I adjust my column sizes in
the designer, it doesnt reflect the column sizes when the listview is
shown (in a fixed size window). I have to use trial and error to get it
right.

I can't reproduce this on my system, the columns always seem to have the
same widths at runtime that I set at design time. I guess it's possible
that this is related to the DPI setting you use - are you an a
"non-standard" value in that regard?
Finally, I would expect the last column to fill out the remaining part of
the listview (it does not have a horizontal scrollbar), but I cant figure
that one out either.

I believe the ListView doesn't have that feature. You'd have to handle the
resize event and calculate column widths yourself.


Oliver Sturm
 
R

Roman Wagner

Soeren said:
I have a strange problem with listview. When I adjust my column sizes in the
designer, it doesnt reflect the column sizes when the listview is shown (in
a fixed size window). I have to use trial and error to get it right.

Finally, I would expect the last column to fill out the remaining part of
the listview (it does not have a horizontal scrollbar), but I cant figure
that one out either.

Do you know what I am doing wrong? I use Visual C# Express.


VS 2005 has a bug in the designer. The designer uses a ',' as delimiter
for some attribute values to describe (f.e.) the width of columns in a
listview. If your current culture uses a ',' as decimal point VS 2005
and the .NET Runtime together will not read the right information from
the resource file generated by the designer.

If you have this problem, fix the column width value so that you do not
use a ','.
 
S

Soeren D.

Hi Roman,

Thanks for your answer.

I think you are on to something right, because here in Denmark, we do use
comma as decimal point. I still cannot make it work, but it explains why
adjusting the sizes in the gui designer went completely wrong.

Haven't they released a fix for this?
 

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