473,414 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Listview column headers

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
3 4154
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Richard | last post by:
Hi. How can I detect right-click on the ListView Column Headers? The click event doesn't do it. Thank you very much, Rick
1
by: Ray Mitchell | last post by:
Hello, I'm trying to create a ListView object with several labeled columns. Using the Visual Studio Toolbox I simply drag a ListView item onto my dialog box. Then I go into the Columns...
2
by: MFRASER | last post by:
I am trying to populate a listview and I can not see the column headers, is there a property I am forgetting to set? Here is my code // Create three items and three sets of subitems for each...
1
by: Sam Martin | last post by:
hi all, anyone know how i can detect this i c#? tia sam martin
3
by: Danny Tuppeny | last post by:
Hi all, I need to build a Treeview/Listview control (none of those on codeproject do quite what I need!), and was considering using one of the existing controls as a starting point, though now...
2
by: Marco | last post by:
Is there a way to get the text in a column header to wrap to multiple lines? I'm using vb.net 2003.
0
by: erik.alsmyr | last post by:
When setting the Scrollable property of a listview and resizeing it the headers will be painted wrongly. This defect is documented in MSDN as: In versions of the .NET Framework prior to version...
1
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Short of writing a custom version of the ListView control, is there a way to force the column headers to contain multiple lines. The problem is that the actual values of the items in each column...
1
by: =?Utf-8?B?LnBhdWwu?= | last post by:
how do i change the color of the text in the fixedrow (column headers) of a listview? thanks
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.