--- In [email protected], "Michael Schmalle" <[EMAIL PROTECTED]> wrote: > > The solution.... > > <?xml version="1.0" encoding="utf-8"?> > <mx:Canvas > xmlns:mx="http://www.adobe.com/2006/mxml" > width="200" height="50"> > > <mx:Script> > <![CDATA[ > > override protected function commitProperties():void > { > super.commitProperties() > > if (data) > { > // uncomment to see this actually work > // setStyle("backgroundColor", 0xFF0000); > > // imaginary prop > if (data.itemColor is Number) > setStyle("backgroundColor", data.itemColor); > } > } > > ]]> > </mx:Script> > > <mx:Label x="10" y="10" text="{data.label}"/> > > </mx:Canvas>
I meant a CSS solution. I could possibly create a classFactory and pass in the styleName in that, but that's not nearly as clean as just using the TypeSelector. I could also pass in a reference to the Application and/or its styles and have the component look at that to see if there is a style that matches the ClassName, but that's sort of icky too. Why is the List component set up to break this? Thanks; Amy

