Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Changing Text Color in ListView

Posted on 1999-01-01
6
Medium Priority
?
346 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 300 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Suggested Courses

722 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