Solved

Changing Text Color in ListView

Posted on 1999-01-01
6
325 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
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now