views:

518

answers:

2

Is there a way to set the BackColor of the ColumnHeaders of a ListView?

A: 

I assume you're talking about Windows here. AFAIK, the header background color is determined by the system, as the ListView is a common control.

You might be able to owner-draw the header. If you're using .NET, there's a DrawColumnHeader event that you might want to implement, but you'd have to owner draw the entire control (i.e. the items as well).

Thorsten Dittmar
A: 

You need to override the WM_CTLCOLOR message, now since I don't know what are you using (MFC, C#) I cannot give you any more details.

For C# take a look at this (CodeProject: Customizing the header control in a ListView)

Shay Erlichmen
I'm using VB, but a C# answer will also do.
Jens

related questions