上的WinForms ListView控件的多线列表中的项目? [英] Multi-line list items on WinForms ListView control?

查看:143
本文介绍了上的WinForms ListView控件的多线列表中的项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法来显示标准的WinForms ListView控件的多行文字?

Is there a way to display multi-line text in standard Winforms listview control?

谢谢, 凯末尔

推荐答案

如果你想在一个ListView多行文本,看看的 ObjectListView (一个开源围绕.NET的WinForms ListView的包装)。这需要许多涉及所有者绘制(和其他的ListView烦恼)的问题负责。

If you want multi-line text in a ListView, have a look at ObjectListView (an open source wrapper around .NET WinForms ListView). This takes care of many of the problems involved with owner drawing (and other ListView annoyances).

在下面的截图,第一列自动换行打开:

In the following screenshot, the first column has WordWrap turned on:

请记住,一个ListView 不能有行不同的高度。在上面的截图,我不能让第一个和第三个行高,显示更多的文字,其他行短。每一行必须是相同的高度。

Just remember that a ListView CANNOT have rows of different heights. In the above screenshot, I cannot make the first and third rows taller to show more text and the other rows shorter. Every row has to be the same height.

如果能够有不同的行高度是必不可少的你,一个ListView不会将您的解决方案。您可能要考虑马修·霍尔的优秀XPTable 和的其更新项目,还有的Lee保罗·亚历山大的梦幻般的Outlook风格的列表

If being able to have rows of different heights is essential to you, a ListView will not your solution. You may want to consider Matthew Hall’s excellent XPTable and its update project, as well as Lee Paul Alexander’s fantastic Outlook-style list.

这篇关于上的WinForms ListView控件的多线列表中的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆