Funny thing is, this is one thing that I think was much more
straightforward in 1.5 (once you know about the setPropertiesAt()
method) than it is in 2.  Sometimes seems like OOP overload for
something as simple as setting a background color; maybe it'll be a
candidate for change in a future update or release.

--- In [email protected], "Tim Hoff" <[EMAIL PROTECTED]> wrote:
>
> Cool, just throwing out ideas.
> 
> Thanks,
> Tim
> 
> --- In [email protected], "Doug Lowder" <douglowder@> 
> wrote:
> >
> > Hi Tim,
> > 
> > The method in Flex 2 is considerably different than Flex 1.5's.  
> The
> > setPropertiesAt() method in 1.5 is inherited from 
> ScrollSelectList, and
> > is the recommended way to set the background color for items in
> > ComboBoxes and DataGrids.
> > 
> > 
> http://livedocs.macromedia.com/flex/15/asdocs_en/mx/controls/listclas
> ses\
> > /ScrollSelectList.html#setPropertiesAt
> > 
> > 
> > --- In [email protected], "Tim Hoff" <TimHoff@> wrote:
> > >
> > >
> > > 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&objectI\
> > \
> > > D=447
> > >
> > <http://www.cflex.net/showfiledetails.cfm?
> ChannelID=1&Object=File&object\
> > \
> > > ID=447>
> > >
> > > -TH
> > >
> > > --- In [email protected], "Doug Lowder" douglowder@ 
> 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 
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/
 


Reply via email to