简体   繁体   中英

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.

您必须将ListView的View属性设置为Details

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM