views:

374

answers:

1

Hi

I created a list control at runtime as following:

var myList:List = new List();
ListArea.addChild(myList);
myList.percentHeight = myList.percentWidth = 100;
myList.itemRenderer =  new ClassFactory (components.renderers.myRenderer);
myList.dataProvider = myDataArray;      
myList.addEventListener(EVENT.CHANGE, historyBarClickHandler);

//Where myDataArray is an ArrayCollection consisting of my Custom ValueObjects.

When i execute the code it displays my list with custom item renderer, which is fine.

But when bring my mouse over it, it doesn't give any colour highlight which means it is not selecting. Secondly, when i click on any of the list item, it doesn't dispatch any change event.

I tried a lot but couldn't understand it. Please Guide

Thanks

+1  A: 

Your itemRenderer may be causing another issue, but you're not listening for the correct event. It should be:

myList.addEventListener(ListEvent.CHANGE, historyBarClickHandler);
ruedaminute