views:

265

answers:

2

I've got a Windows Forms ListView control in details mode. There are multiple columns at play. I'm trying to use owner draw to place a particularly wide column "below" the others.

So, instead of this:

COLUMN1  COLUMN2  COLUMN3  COLUMNNNNNNNNNNNNNNNNNNN4

I'm trying to do this:

COLUMN1  COLUMN2  COLUMN3
COLUMNNNNNNNNNNNNNNNNNNN4

I cannot figure out how to enlarge the bounds of the item to fit in the room to draw the column below. Any ideas?

A: 

A ListView cannot do such a thing. Well... it can, but only with ObjectListView and even then it's not easy. There is a sample showing how to do something like that, but not quite:

alt text

Try using Lee Paul Alexander’s fantastic Outlook-style list.

alt text

Grammarian
+1  A: 

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.

Hans Passant