Pratap
04-18-2008, 06:57 AM
Hi....
am facing a hectic problem with ITemRenderes..
My requirement is like i need to insert a Label and Image in each item of Horizontal List.
For this i created a ArrayCollection with Lable and ImagePath. And assigning array as a Dataprovider to HorizontalList. and am attaching itemrenderer to it (which hold the lable and image).
code:
var data:ArrayCollection=new ArrayCollection({label:'A', path:'a.jpg'}, {label:'B', path:'b.jpg'}{label:'C', path:'c.jpg'});
var hList:HorizontalList=new HorizontalList();
hList.dataProvider=data;
hList.itemRenderer=new ClassFactory(rendererObj);
rendererObj holds the Lable Component and Image Componnet..
Now the porblem is am trying to change the horizontal list at runtime. Like i want to change the lable of selected item in Horizontal list. Am able to update the arraycollection values. But its not getting effected in ItemRenderer.
How to update the itemerenderer at runtime...?
Thanks in Advance...
Pratap
am facing a hectic problem with ITemRenderes..
My requirement is like i need to insert a Label and Image in each item of Horizontal List.
For this i created a ArrayCollection with Lable and ImagePath. And assigning array as a Dataprovider to HorizontalList. and am attaching itemrenderer to it (which hold the lable and image).
code:
var data:ArrayCollection=new ArrayCollection({label:'A', path:'a.jpg'}, {label:'B', path:'b.jpg'}{label:'C', path:'c.jpg'});
var hList:HorizontalList=new HorizontalList();
hList.dataProvider=data;
hList.itemRenderer=new ClassFactory(rendererObj);
rendererObj holds the Lable Component and Image Componnet..
Now the porblem is am trying to change the horizontal list at runtime. Like i want to change the lable of selected item in Horizontal list. Am able to update the arraycollection values. But its not getting effected in ItemRenderer.
How to update the itemerenderer at runtime...?
Thanks in Advance...
Pratap