PDA

View Full Version : Top render component over Desktop (context menu)



Aero
9 Jun 2010, 5:02 AM
Hi,

New to ExtJs, i am trying to display a custom context menu upon right-click by adding:



Ext.getDoc().on({'contextmenu': function(e)
{

var menu = new Ext.menu.Menu({
id: 'gridCtxMenu',
items: [{text: 'Add'}
]
});


Ext.Msg.alert('Rightclick','works');
e.preventDefault();
},
scope:this
});



Just being confussed on what to do to actually render it on top of the desktop just like the msgBox 8-|

Trying to understand how other window can be shown by the createWindow function in the sample.js file.

Thanks to all,lots of information upon search (probably an answer to my question aswell but i can't find it)

--Edit the solution was simply add showAt([e.getPageX(),e.getPageY()])...yes i found it by doing a search...