Solved

Colour of combo box items

Posted on 2003-11-18
1
171 Views
Last Modified: 2013-11-20
How can I change the colour of individual list items in a combo box?  It must affect individual items, not the whole list.  Also, it needs to be interchangable at run time (i.e. I set it to one colour when initialising and then later decide to change it to something else).
0
Comment
Question by:reidy_boy
1 Comment
 
LVL 11

Accepted Solution

by:
KurtVon earned 50 total points
ID: 9771149
The only way I know of to do this would be an owner draw combo box.  You will need to draw the text yourself, but you can choose the color for the item when you draw it.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfcnotes_tn014.asp

Hope this helps.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

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