Solved

Changing Text Color in ListView

Posted on 1999-01-01
6
331 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

813 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