List View Item Size
I have a C# Winform List View. The only problem I have with it is that the items that get added are confined to a small space and if the text is larger than a few words then it gets hidden. What I need to do is to have each item on it's own line and to be able to have the item text to fill the size of the line.
Any help is much appreciated!开发者_运维技巧
I usually do something like this
foreach (ColumnHeader lvColumn in listView.Columns)
{
lvColumn.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
}
after populating the listview to adjust column width to fit contents.
You must set the View
property of the ListView to Details
.
精彩评论