-
20 Jan 2009 8:29 AM #1
How to handle dblclick event in a Field?
How to handle dblclick event in a Field?
Hi, I'm trying to catch the double click event in a field, but it doesn't work.
That's my code:
The same with TextField.Code:ListField<SimpleValueModel> control = new ListField<SimpleValueModel>(); control.addListener(Event.ONDBLCLICK, new Listener<BaseEvent>() { public void handleEvent(BaseEvent be) { Info.display("test", "double clicked"); }; });
Is there any way to do that?
Thanks,
Mariusz
-
20 Jan 2009 8:38 AM #2
OK, I found the solution, but this is inconsistient, onclick event can be catched from the ListField, but the ondoubleclick can be handled only from the ListView:
HTML Code:control.getListView().addListener(Events.OnDoubleClick, new Listener<BaseEvent>() { public void handleEvent(BaseEvent be) { Info.display("test", "double clicked"); }; });
-
20 Jan 2009 11:29 AM #3
I think the double click can be added to the set of events for ListField
this thread might help. http://www.extjs.com/forum/showthread.php?t=53670.
you can even check the gxt FAQ to learn more about sinking the events.


Reply With Quote