PDA

View Full Version : [CLOSED] Hide -ContextMenu Tile and Cascade



Vamsi
Nov 19, 2020, 7:05 AM
Hi Sir,

I don't want show the Contextmenu for Tile and cascade in desktop control when right click.

When user right click on the desktop control context menu appears and I have gone through the example code but I have not seen any code related to this.

Please let me know how to hide this.

25463


Thank you,
Vamsi.

Vamsi
Nov 20, 2020, 5:49 AM
Hello Sir,

Waiting for reply.

Thank you,
Vamsi.

fabricio.murta
Nov 20, 2020, 10:48 PM
Hello @Vamsi!

Sorry for the delay, please give us a bit more time to check your issue and provide you an answer. No matter what, this should require extension of the desktop component, so we are checking the feasibility of a fix via an override.

We'll get back to you soon.

fabricio.murta
Nov 25, 2020, 3:59 AM
Hello @Vamsi!

If you want to just remove these entries, you can do this:



Ext.define("MyMenulessDesktop", {
override: "Ext.ux.desktop.Desktop",
createDesktopMenu: function () {
var me = this,
ret = {
items: me.contextMenuItems || []
};

if (ret.items.length) {
ret.items.push('-');
}

return ret;
}
});


If you want to completely disable context menu, then use this:



Ext.define("MyMenulessDesktop", {
override: "Ext.ux.desktop.Desktop",
onDesktopMenu: Ext.emptyFn
});


Hope this helps!

Vamsi
Dec 02, 2020, 5:51 AM
Thank you Sir, Work as expected. Please close this thread.

fabricio.murta
Dec 02, 2020, 10:35 PM
Thanks for the feedback, glad the suggestion worked for you!