PDA

View Full Version : different item color in combobox


Marena
10-15-2004, 09:48 AM
hi, is there any way how to change color of some items (text - bacground...) in combobox?

robgobbler
10-17-2004, 04:21 AM
i dont know if there is, but i asked a similar question and posted my workaround to http://www.actionscript.org/forums/showthread.php3?t=56675

i was doing something a little different but it should be pretty straightforward to transfer what i did to what you want to do.. it only took a few minutes.

good luck!

farafiro
10-17-2004, 01:17 PM
ComboBox.setStyle("themeColor","haloOrange")
ComboBox.setStyle("backgroundColor","0x336699")
ComboBox.setStyle("color","0xFFFFFF")
read more inthe help about: Customizing the ComboBox component

Marena
10-17-2004, 07:17 PM
ComboBox.setStyle("themeColor","haloOrange")
ComboBox.setStyle("backgroundColor","0x336699")
ComboBox.setStyle("color","0xFFFFFF")
read more inthe help about: Customizing the ComboBox component

This customize whole combobox, but i need only specific item.

I spend some time with documentation and find this:

comboBox.setStyle("alternatingRowColors", [0xFFFFFF, 0xBFBFBF]);

robgobbler
10-18-2004, 09:59 PM
yeah.. i dont think the question was understood. thanks for trying to help though.

and marena i think that's about as far as you can go with more than one color as a bg in a combobox. (alternating row color)

did my approach (the link above) make sense? It's pretty easy and it's a lot easier imo to unpdate the contents of the homebrew combobox i made than the stock flash component anyway. plus you have control over every aspect of the style and look this way.