Figured out the answer to my question. You dont need to extend 
ListeItemRenderer. The 
default one is good enough.
The currentTarget property of the ListEvent.Click (Not ListEvent.ItemClick) 
will tell you 
whether you clicked on the icon (if it exists) or the textfield.

--- In [email protected], "Vijay Anand Mareddy" <[EMAIL PROTECTED]> 
wrote:
>
> I am using a simple List with icons and labelText using the iconFunction and 
> labelfunction respectively ...is there a way to tell on mylist.itemClick  if 
> the user has 
> clicked on the icon or the labelText ? 
> 
> Both ListEvent.target and ListEvent.currentTarget are mx.controls.List  ...is 
> there any 
other 
> property i can look at ? 
> 
> I even tried my own simple MyListItemRenderer but myClickHandler is not 
> invoked!
> 
> public class MyListItemRenderer extends ListItemRenderer {
> 
> private function myClickHandler(e:MouseEvent):void{
>                trace('myClickHandler invoked');
>  }
> 
> override protected function commitProperties():void{
>          super.commitProperties();
>          if(icon){
>               trace('icon is NOT null');
>                icon.addEventListener(MouseEvent.CLICK,myClickHandler);        
>                                         
>          } else {
>               trace(' icon is null');
>          }
> }
> }
>

Reply via email to