PDA

View Full Version : Solved: Changing font color in dropbox



talhamoin
04-03-2011, 04:58 AM
I have a drop box with option of colors:


cboColorList.AddItem "Aqua"
cboColorList.AddItem "Blue"
cboColorList.AddItem "Bright Green"
cboColorList.AddItem "Dark Green"
cboColorList.AddItem "Indigo"
cboColorList.AddItem "Lavender"
cboColorList.AddItem "Orange"
cboColorList.AddItem "Red"



I want that every option should be in the color it describes. i.e. Aqua should appear in aqua color. Blue in blue color and so on.

Is it possible?

Paul_Hossler
04-03-2011, 08:03 AM
Not as far as I know

What you could do is link the item selection in the drop box to a label.

In the Label you can then set the BG color to the dropdox selection, just as a example


So selecting cboColorList.AddItem "Orange" would change the Label's BG to Orange, and you could set the Label Caption to "Orange'

Paul

talhamoin
04-03-2011, 10:09 AM
Can't we add an image to combo box? This way I can add a small image with each color option and the image will show color.

Paul_Hossler
04-03-2011, 03:18 PM
I don't think you can add a picture to each line of the List

No way I know anyway

Paul

macropod
04-03-2011, 04:29 PM
Cross-posted at:
http://www.tek-tips.com/viewthread.cfm?qid=1643914&page=1

talhamoin: For cross-posting etiquette, please see: http://www.excelguru.ca/node/7