Solved

Changing Text Color in ListView

Posted on 1999-01-01
6
336 Views
Last Modified: 2013-12-26
Is there any way of changing the text color for individual rows and columns or cells in a listview control. There are API calls to set the extended style for this control but I have seen nothing about text color. Where does one obtain documentation on this control or COMCTL32.dll so as to design own API calls using 'SendMessage'?
0
Comment
Question by:bgrove
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1489354
Not with the standard listview
0
 
LVL 1

Expert Comment

by:eosu
ID: 1489355
I have searched long and hard for this.  There is no way to do it with the standard listview. You can set the extended styles such as FullRowSelect easily enough and one would imagine that this is where the colour would have been manipulated, but it simply does not allow it.
0
 

Expert Comment

by:Aim
ID: 1489356
I have changed the text color of individual rows of a Listview control utilizing the API and a Subclass control, but I don't know if you can do the same with columns or cells.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:bgrove
ID: 1489357
AIM

Please advise on API call to do this. Changing an entire row might be all I need to do.
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1489358
Switch to VB6. In VB6 this is supported
0
 
LVL 2

Accepted Solution

by:
adrianmaull earned 100 total points
ID: 1489359
VB6 supports this kind of behavior.  However, if VB6 is not an option
and you don't mind some complicated subclassing check out:
http://www.codeguru.com/vb/Controls/ListView/index.shtml

The sample is called ListView Coloured Items.

Adrian Maull [MCSD]
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question