0

我有一个处于详细信息模式的 Windows 窗体 ListView 控件。有多个列在起作用。我正在尝试使用所有者绘制在其他列“下方”放置一个特别宽的列。

所以,而不是这个:

COLUMN1  COLUMN2  COLUMN3  COLUMNNNNNNNNNNNNNNNNNNN4

我正在尝试这样做:

COLUMN1  COLUMN2  COLUMN3
COLUMNNNNNNNNNNNNNNNNNNN4

我无法弄清楚如何扩大项目的边界以适应房间以绘制下面的列。有任何想法吗?

4

2 回答 2

1

All rows in a ListView have to be the same height. You can get a tall row that fits more than one line of text by making the Font large, then using a small font in the DrawItem event handler.

If this is too restrictive then you should look at DataGridView or a custom 3rd party component.

于 2010-01-29T18:10:01.990 回答
1

ListView 不能做这样的事情。嗯......它可以,但只有使用ObjectListView,即使这样也不容易。有一个示例展示了如何做类似的事情,但不完全是:

替代文字
(来源:sourceforge.net

尝试使用 Lee Paul Alexander 出色的Outlook 样式列表

替代文字

于 2010-01-25T10:32:17.630 回答