Hi Amy,
Thanks for that example. It did help me partially. My item renderer is a custom item renderer. <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" backgroundColor="#C9C9C9" borderStyle="solid" borderThickness="0" cornerRadius="5"> <mx:HBox id="box" horizontalAlign="center" verticalAlign="middle" width="100%" height="100%" borderColor="#B7BABC" borderStyle="solid" borderThickness="0" cornerRadius="5" themeColor="#009DFF" > <mx:VBox horizontalAlign="center" verticalAlign="middle" borderStyle="solid" borderThickness="0" cornerRadius="5"> <mx:Image id="image" width="100" height="100" source="assets/{data.Image}" visible="true"/> <mx:Label text="{data.Name}" width="100" textAlign="center" visible="true" /> </mx:VBox> </mx:HBox> </mx:VBox> My style function is quite simple for now. private function enoDefaultStyleFunction(xmlData:XML):Object { return {color:0x0000FF}; } What this does is that it sets the color of the Label text as blue (0x0000FF). How do i set the background of the VBox or the HBox within my custom item renderer. I tried changing style function to return "backgroundColor:0x0000FF", however that had no effect. Once again many thanks for giving a precise answer. Cheers --- In [email protected], "droponrcll" <amyblankens...@...> wrote: > > > > --- In [email protected], anuppc <anuppc@> wrote: > > > > > > Hi, > > I'm new to flex, would need some help from the experts. > > > > I have a TileList in my application.. Here is the snippet: > > > > > > var favList:TileList = new TileList(); > > favList.columnCount = 2; > > favList.dataProvider = favArr; > > favList.itemRenderer = createItemRenderer(); > > favList.percentHeight = 100; > > favList.percentWidth = 100; > > favList.dropEnabled = true; > > favList.dragEnabled = true; > > favList.dragMoveEnabled = true; > > > > The ItemRenderer tied to the TileList is : > > > > <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" > > height="100%" borderStyle="solid" borderThickness="0" cornerRadius="5"> > > <mx:Style> > > > > .filled > > { > > border-style: solid; > > border-thickness: 0; > > border-skin: ClassReference("border.SimpleGradientBorder"); > > fill-colors: #F0F0F0, #C9C9C9; > > corner-radius: 10; > > drop-shadow-enabled: true; > > } > > > > </mx:Style> > > <mx:Script> > > <![CDATA[ > > public function changeStyleWest(col1:String, col2:String):void > > { > > box.setStyle("fillColors", [col1, col2]); > > } > > ]]> > > </mx:Script> > > <mx:HBox id="box" styleName="filled" horizontalAlign="center" > > verticalAlign="middle" width="100%" height="100%" borderColor="#B7BABC" > > borderStyle="solid" borderThickness="0" cornerRadius="5" > > themeColor="#009DFF" > > > <mx:VBox horizontalAlign="center" verticalAlign="middle" > > borderStyle="solid" borderThickness="0" cornerRadius="5"> > > <mx:Image id="image" width="100" height="100" > > source="assets/{data.Image}" visible="true"/> > > > > <mx:Label text="{data.Name}" width="100" textAlign="center" > > visible="true" /> > > </mx:VBox> > > > > </mx:HBox> > > > > </mx:VBox> > > > > Now what i want to achieve is else where in the application there are couple > > of buttons and on clicking these buttons i want to change the fill-colors or > > style of each Tile based on some Data attributes. > > http://flexdiary.blogspot.com/2008/08/tilelist-with-stylefunction.html > > There's a more complete example of how to use it in the Grouping Function > example. > > HTH; > > Amy >

