Solved

Colour of combo box items

Posted on 2003-11-18
1
176 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
maven archtype selection in eclipse 1 58
centeredAverage challenge 8 185
sum67 challenge 35 114
java ^ examples 8 69
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

679 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