By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,239 Members | 1,503 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,239 IT Pros & Developers. It's quick & easy.

Listview column headers

P: n/a
JL
Is it possible and if so, how, to change the color (and/or font) of a
listveiw's column headers at runtime and individually?

TIA,
John
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
No, the ColumnHeader class of the .NET Framework lacks those properties, so
you would need to use custom drawing and the Win32 API. Notice that there is
a Column Header control on its own that the listview uses internally, and
that you can get its window handle sending the LVM_GETHEADER message to the
listview:

http://msdn.microsoft.com/library/de...der/header.asp

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"JL" <jo**@marymonte.com> escribió en el mensaje
news:bk********************************@4ax.com...
Is it possible and if so, how, to change the color (and/or font) of a
listveiw's column headers at runtime and individually?

TIA,
John

Nov 21 '05 #2

P: n/a
"JL" <jo**@marymonte.com> schrieb:
Is it possible and if so, how, to change the color (and/or font) of a
listveiw's column headers at runtime and individually?


<URL:http://www.codeproject.com/cs/miscctrl/customheader.asp>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #3

P: n/a
JL
Thank you Carlos and Herfried. I was afraid it was not possible. Seems
very short sited of MS to leave out those important properties. But,
oh well...

John

On Tue, 20 Sep 2005 16:09:52 -0700, JL <jo**@marymonte.com> wrote:
Is it possible and if so, how, to change the color (and/or font) of a
listveiw's column headers at runtime and individually?

TIA,
John


Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.