开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜