I'm wondering if it's possible to unselect a Spark List when clicking in the empty area?
I've attached this function to the list's click event:
protected function list_clickHandler(event:MouseEvent):void
list.selectedIndex = -1;
But the list gets unselected even if I click on a item in the list. Is there a way to prevent the event when clicking on an item?
Thanks a lot!:)
It's because the event bubbles all the way up. You have to explicit stop the event doing so.
You can do it within an "item_clickHandler(ev:Event)" where you can stop propagation via the Event stopImmediatePropagation or stopPropagation methodes...
That did the trick! Thank you very much.