Solved

Changing Text Color in ListView

Posted on 1999-01-01
6
334 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA filters 2 67
Error when passing an argument to a vb6 that contains  '/' 7 40
Advice in Xamarin 21 97
Fastest way to find and count same items VB6 16 26
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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…

830 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