Use the setPropertiesAt() method of the combobox's dropdown property:
<mx:ComboBox
creationComplete="setColors(event.target.dropdown)" />
<mx:Script>
<![CDATA[
function setColors(dropdown: Object) : Void {
dropdown.setPropertiesAt(0, {backgroundColor: 0xFF0000});
dropdown.setPropertiesAt(1, {backgroundColor: 0x00FF00});
dropdown.setPropertiesAt(2, {backgroundColor: 0x0000FF});
// etc...
}
]]>
</mx:Script>
--- In [email protected], "jcarrera04" <[EMAIL PROTECTED]> wrote:
>
> I am using Flex 1.5.
> I want to have differnent colors for the strings displayed in the
> combobox and drop down menu. I tries manipulating the labelFunction
> but I don't know a way to specify color. Also, I tried creating a
> list renderer but that didn't seem to do the trick. Any ideas?
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/