PDA

View Full Version : read coordinates on right click of mouse



TAG
24 Jul 2009, 8:06 AM
hello,
I intercept the event right click of the mouse on the tree, and I would view the contectual mený on right click. I create all, but I can't read the coordinates of the right-mouse click.
The code is:

....
listeners: {
'contextmenu': function(e,t){var coords = t.getXY();alert("coordinate:"+coords[0]+"-"+coords[1]);
}}
....


the value returned is always (-1, -1). I use the Api Doc of the Ext.tree.TreeNode for events of the Tree node.....

Animal
24 Jul 2009, 11:30 AM
Here is your answer:

http://extjs.com/deploy/dev/docs/?class=Ext.Element&member=addListener

TAG
24 Jul 2009, 10:55 PM
thanks, I resolve a problem yestday with this method.....:)