Works for me. Perhaps you were calling setPropertiesAt() before the ComboBox had been created.
Here is a working example. Note that the theme color overrides the background color for the selected item (select a different item from the combobox to see what I mean). Doug <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" width="100%" height="100%"> <mx:Script> <![CDATA[ function setComboColors() { myComboBox.dropdown.setPropertiesAt(0, {backgroundColor: 0xC00000}); myComboBox.dropdown.setPropertiesAt(1, {backgroundColor: 0x00C000}); myComboBox.dropdown.setPropertiesAt(2, {backgroundColor: 0x0000C0}); } ]]> </mx:Script> <mx:Panel width="100%" height="100%" title="ComboBox"> <mx:ComboBox id="myComboBox" creationComplete="setComboColors ()"> <mx:dataProvider> <mx:Array> <mx:String>Red</mx:String> <mx:String>Green</mx:String> <mx:String>Blue</mx:String> </mx:Array> </mx:dataProvider> </mx:ComboBox> </mx:Panel> </mx:Application> --- In [email protected], "douglowder" <[EMAIL PROTECTED]> wrote: > > Well that's strange. I don't see any typos offhand, but I'll give it > a quick test to see what's up. You of course need to supply your own > definitions for the "myComboBox" and "itemNumber" variables in your code. > > In the meantime, have a look at the "dropdown" property of ComboBox, > and the "setPropertiesAt" method of ScrollSelectList. That should > give you the information you need. > > Doug > > --- In [email protected], Rajni <[EMAIL PROTECTED]> wrote: > > > > Hi Daug, > > > > Thanks a lot for replying...But this code doesn't work.... > > > > Thanks > > -Rajni > > > > > > On Fri, Jan 27, 2006 at 11:37 PM, douglowder wrote: > > > > > To change the background color, try something like: > > > > > > myComboBox.dropdown.setPropertiesAt(itemNumber, {backgroundColor: > > > 0x000080}); > > > > > > You can also replace the color with a function that returns the > proper > > > color value based on the item number or whatever else you want. > > > > > > Doug > > > > > > --- In [email protected], Rajni <[EMAIL PROTECTED]> wrote: > > >> > > >> > > >> how to change color or background color of more than one item in > > > a > > >> combo box? > > >> > > >> > > >> Sent using Laszlo Mail. Try it yourself. > > >> http://www.laszlomail.com > > >> > > > > > > > > > > > > > > > > > > > > > > > > -- > > > 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 > > > > > > > > > > > > > > > > > > > > -- > > Sent using Laszlo Mail. Try it yourself. > > http://www.laszlomail.com > > > -- 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/

