05-22-2011 10:49 PM
There's ListEvent.ITEM_CLICKED event for clicking on the cell. In most the cases, it's good enough to handle the list select event. But if I have two buttons in every cell, I need a better way to detect the click event.
Here's the issues:
1. ICellRenderer doesn't have the reference to the list it belongs to, so I cannot send message to the list directly when the click event happens
2. The List doesn't seem to have the references to all the cells(it only knows lastVisibleCell and firstVisibleCell), so it cannot add event listens to every cell for my custom event from the cell.
Anyone have any suggeston how to do this?
05-23-2011 12:55 AM
- On Mouse down each renderer processes the target, decides it's "clickAction" and stores that as a public var.
- When your list is clicked, look at the the renderer to see what it's clickAction is.