Hi ,
I am using context menu on right click of tree node. I need one panel to appear on click event.
whenever i right click on node, menu comes at different positions. I need menu to be appear next to clicked tree node. can anyone help with this?
contextMenu code
*******************
contextMenu: new Ext.menu.Menu({
items: [{
id: 'menu',
text: 'Chat'
}],
listeners: {
itemclick: function(item) {
switch (item.id) {
case 'menu':
var n = item.parentMenu.contextNode;
openChatWindow(n.id);
break;
} Enable Right Click Click Scanning - Mischel Internet Security Forum:: Okay, that Contextmenu.dll file is the problem with right contextmenu.dll the problem? The problem exists since my change to Vista, XP worked fine http://www.misec.net/forum/?action=display;board=TrojanHunter;num=1205221851;start=0HOME | Ext Events and HTMLEditor contextmenu [Archive] - Ext JS Forums:: [Archive] Ext Events and HTMLEditor contextmenu Ext: Help but I still having the same problems than you. anyone can help us? Regards.~o) knight9 http://extjs.com/forum/archive/index.php/t-22619.htmlHOME |
}
}
}),
******************
contextmenu: function(node,e) {
node.select();
var c = node.getOwnerTree().contextMenu;
c.contextNode = node;
c.showAt(e.getXY());// this gives diff values each time
there are getX and getY methods:
var y =Ext.fly(node.ui.textNode).getY() + 17;
var x = Ext.fly(node.ui.textNode).getX();
c.showAt(x,y);
could you please let me know how to get XY of clicked node.... so that i can display menu next to node
hey Thanks a lot...
now my contextmenu is working fine !!!!
hey It worked !!!
could you just tell me how to add XY into to it now?
when i click on node , menu is coming on that node... i want to shift the position so that node text will be visible
Ext.fly(node.ui.textNode).getXY()
e.getXY gives you params from the mouse. Is that not waht you want?
Nortel Unveils Vision, Strategy for Israeli High-Performance Net
Busy Friday Leads to Strong Close for Net Stocks
|