So if the renderer used say, a style named "aaronRadius" to determine the size 
of the circle, you don't have to change the styleName on the renderer.

If you put a List selector in your styles block with "aaronRadius" in it, it 
should transfer through to the renderer.  You won't be able to use aaronRadius 
in the <mx:List tag because it isn't defined in the style MetaData, but you 
could pair your renderer with an AaronList subclass that defines aaronRadius on 
it, and makes your renderer the default renderer.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf 
Of Aaron Hardy
Sent: Saturday, March 14, 2009 7:48 PM
To: [email protected]
Subject: Re: [flexcoders] Styling a list item renderer

Thanks for the response Alex. The styles I'm mostly talking about are 
very specific to the item renderer. For example, my renderer has a 
colored circle in it along with a few other things. I'd like to specify 
a radius style that can be a specific radius for one list and a 
different radius for a separate list.

Thanks again for taking the time to participate on the list.

Aaron

Alex Harui wrote:
>
> There isn't a formal way. The styleName property will be assigned the 
> List (actually an inner content pane), but I think after it has been 
> added to the content pane you can reset it, like in createChildren or 
> commitProperties. Normally, all of the styles of a renderer are 
> supplied by styles set on the List. Which styles would you want to 
> apply to List that are different from ones you'd want to apply to the 
> renderer?
>
> Alex Harui
>
> Flex SDK Developer
>
> Adobe Systems Inc. <http://www.adobe.com/>
>
> Blog: http://blogs.adobe.com/aharui <http://blogs.adobe.com/aharui>
>
> *From:* [email protected] [mailto:[email protected]] 
> *On Behalf Of *Aaron Hardy
> *Sent:* Saturday, March 14, 2009 10:19 AM
> *To:* [email protected]
> *Subject:* [flexcoders] Styling a list item renderer
>
> Hey flexers,
>
> What's the formal way to set a styleName to a list item renderer? It
> seems like ListBase would have an itemRendererStyleName of some sort,
> but I have yet to discover it. I realize in the renderer class
> constructor I could do something like this.styleName = 'mystyle'; but it
> doesn't seem flexible enough. What if I want to use the same renderer
> in two different lists, but styled differently? I'm just thinking
> there's got to be a better way that I'm missing.
>
> Thanks everyone.
>
> Aaron
>
> 



------------------------------------

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links



Reply via email to