listview lock column size winform
I want make listview columns non resizable. Is there any property for column to lock its width? I don't开发者_Go百科 want to implement this functionality with handling event because it is partial solution for this problem.
It requires intercepting the message to change the size of the columns. This can be done by derving your own ListView control that inherits from ListView
. See this article for a C# example.
As you describe, you can also resize it to a constant value by handling the ColumnWidthChanged
event of the existing ListView
.
If you would like to try a 3rd party component, Better ListView have AllowResize, MinimumWidth and MaximumWidth properties on columns, so that you can adjust individual columns simply by settings these properties.
There is also a freeware edition called Better ListView Express.
精彩评论