C# - Listview colum header height (Windows Form)

c#, listview, visual-studio-2008, winforms

Solution

It is not easy but it can be done.

The basic strategy is to get the underlying header control from the `ListView` (using LVM_GETHEADER message), setup a `NativeWindow` instance on that control, and then listen for HDM_LAYOUT messages. In that message, you can specify the location and size of the header.

As the author of ObjectListView mentioned above, I have to say it's much easier to let someone else do all this work for you. ObjectListView uses dynamic header height to allow multiline headers and vertical text, like this:

Problem

How can I change the height of the column header in a ListView ? (visual studio-2008,windows forms)

Original source