在的WinForms ListView的可变高度的行高度、WinForms、ListView

由网友(青葱岁月)分享简介:是否有可能有在一个WinForms ListView的可变高度的行详细模式?Is it possible to have variable-height rows within a WinForms ListView in Details mode?没有的rowHeight或行[I]在控制.Height财产据我所知...

是否有可能有在一个WinForms ListView的可变高度的行详细模式?

Is it possible to have variable-height rows within a WinForms ListView in Details mode?

没有的rowHeight或行[I]在控制.Height财产据我所知。

There is no RowHeight or Rows[i].Height property on the control as far as I know.

一些博客建议实施的OwnerDraw,而我做到了,但我仍然找不到任何从事件处理程序中类似height属性。

Some blogs suggests implementing OwnerDraw, which I did, but I still can't find anything resembling height property from within the event handlers.

在理想情况下,必要时行高度会自动调整大小以显示多行文本。

Ideally, the row height would auto-size to show multiline text when needed.

推荐答案

一个选项可以想到的:

要覆盖所有行项目的高度,创建一个虚拟的ImageList并将其设置为想要的高度,这取决于视图分配给列表视图或掌握的 HTTP://www.$c$cproject.com/KB/list/changerowheight.aspx

To override the item height of all rows, create a dummy ImageList and set it to the desired height and assign it to the listview depending on the view or grasp the concept of http://www.codeproject.com/KB/list/changerowheight.aspx

如果您使用 ObjectListView ,您可以更改的所有行$ P本项目高度$ ptty的轻松的。但尽管如此,也没有办法,你正在使用的ListView只要改变个别项目的高度。

If you use ObjectListView, you can change the item height of all rows pretty easily. But still, there is no way to change the individual item height as long as you are using ListView.

阅读全文

相关推荐

最新文章