I have a list using a custom MXML item renderer:
<mx:List id="personList"  itemRenderer="PersonRenderer"
dataProvider="{people}"/> 

I'd like the user to have a checkbox in the main application to decide
if they want to see the people's pictures in the list or not.  On
change of the checkbox, I'd like to be able to say "Hey list (or
list's item renderer class), change all your items from the base state
to a state called "withPhoto".

I tried to make a static function "changeState" for PersonRenderer,
but then I can't access the currentState property... makes sense.

I was thinking of looping through each item in the list and changing
it's specific instance of PersonRenderer's state?  But I'm not too
sure how to do that.  Or is there a better way to do it?
 
I currently have the base and "withPhoto" states defined in the
renderer, and would like to keep it in that one renderer.  I
considered just changing the list's itemRenderer to
"PersonRendererWithPhoto" but then I'd lose any pretty transitions,
fades, etc. as the photo is displayed...  that's no good.

Thanks!

-- TC





--
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