It seems to me that it's very difficult to prevent resize of column for ListView

T

Tony Johansson

Hello!

I now use a ListView and it works great but I want to be able to disable the
resize of columns.
I can set HeaderStyle to None but then will my ColumnHeaders be removed.
I have google for it and it seems to me that it's build into the design of
the ListView which mean it very difficult to disable this column resizing.

Or somebody might have a good solution to this problem

//Tony
 
T

Tony Johansson

Peter Duniho said:
Sounds like something that's not really a problem. Of what concern is it
to you if the user decides they prefer the columns widths to be something
different than what you've set them to programmatically?

That said, if you really would like to abuse your users, you should handle
the ColumnWidthChanging event and always set the
ColumnWidthChangingEventArgs.Cancel property to "true". That will prevent
them from being able to change the column widths, by always canceling any
new width they attempt to set them to.

Pete

Is there a way to see the data in a column in a ListView when the column is
smaler than the data. The only way I have found is to grab the header column
line and make it wider. I have hoped that I could just hover of the actual
cell and than the complete data in the cell should be displayed.

//Tony
 
T

Tony Johansson

Peter Duniho said:
[...]
Is there a way to see the data in a column in a ListView when the column
is
smaler than the data. The only way I have found is to grab the header
column
line and make it wider. I have hoped that I could just hover of the
actual
cell and than the complete data in the cell should be displayed.

Have you set the ListView.ShowItemToolTips property to "true"?

You are like a manual knows everything.
Thanks.

//Tony
 

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