Hi Wayne,
Wayne Si wrote:
> Hi,
>
> I got four lists on my form. Now I'm listening the double click event on
> each of them but I use the same event handler. However, in the arguement
> (only one mouse event) passed into the event handler, I can't find any clue
> to identify which list sent the event, and even the actual target of the
> mouse event is scrollpane which is inside the list.
>
> Is there any solution, or I have to use different event handler on each
> list?
To identify the different list widgets you can set some specific user
data to each of them.
--snip--
myFirstList.setUserData("id", "first");
mySecondList.setUserData("id", "second");
--snip--
And inside the event listener method you can traverse up the widget
hierarchy by using "e.getTarget().getLayoutParent()" to access the list
widget. With "getUserData('id')" you can determine which list was chosen
by the user.
cheers,
Alex
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel