开发者

List View Item Size

开发者 https://www.devze.com 2023-03-12 23:20 出处:网络
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 nee

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消