Hi,
A labelFunction only allows you to format text, not apply styles. Here is an example using an itemRenderer. It's for 2.0, but hopefully it will give you some ideas.
http://www.cflex.net/showfiledetails.cfm?ChannelID=1&Object=File&objectID=447
-TH
--- In [email protected], "Doug Lowder" <[EMAIL PROTECTED]> wrote:
>
> 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" jcarrera04@ 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
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___

