>
> On 7/5/05, ROUSSELIE David ROSI/SIFAC
> <[EMAIL PROTECTED]> wrote:
>
> > How to create an itemRenderer class that set scaleX and
> scaleY to the selected item in the list ?
>
> In the setValue function of your cell renderer, you can query for the
> item index and compare with the selected item's index and set the
> scale values accordingly.
>
> <mx:VBox xmlns:mx="http://www.macromedia.com/2003/mxml"; xmlns="*">
>   <mx:Label id="lbl" />
>   <mx:Script>
>    var listOwner : MovieClip;
>    var getCellIndex : Function;
>
>     function setValue(str, item, sel)
>     {
>       lbl.text = str;
>       if (getCellIndex().itemIndex == listOwner.selectedIndex)
>         lbl.text = "foo";
>     }
>   </mx:Script>
> </mx:VBox>
>
> This cell renderer sets the display to "foo" for the selected item.
>

That work for new selected items but setValue is not called when an item become 
unselected.
The selected item label is "foo", then I select another item which label become 
"foo" but
the previous selected item always have a label "foo". The label is updated (to 
'str' value)
only when mouse pass over that previous item.

***********************************
Ce message et toutes les pieces jointes (ci-apres le "message") sont 
confidentiels et etablis a l'intention exclusive de
ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite.
Tout message electronique est susceptible d'alteration. Le Groupe France 
Telecom decline toute responsabilite au titre de
ce message s'il a ete altere, deforme ou falsifie.
Si vous n'etes pas destinataire de ce message, merci de le detruire 
immediatement et d'avertir l'expediteur.
***********************************
This message and any attachments (the "message") are confidential and intended 
solely for the addressees. Any unauthorised
use or dissemination is prohibited.
Messages are susceptible to alteration. France Telecom Group shall not be 
liable for the message if altered, changed or
falsified.
If you are not receiver of this message, please cancel it immediately and 
inform the sender.
***********************************


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