Check documentation for the latest version 6.0 of dhtmlxSuite detachContextMenu DHTMLX Docs

detachContextMenu

detaches a context menu from windows globally or detaches a custom window's menu

void detachContextMenu(object menuObj);

Parameters

menuObjobjectthe context menu's object (returned by the attachContextMenu method)

Example

// attach a global context menu to windows
var myMenu = dhxWins.attachContextMenu();
// detach 
dhxWins.detachContextMenu();
myMenu = null;
 
 
// attach a custom context menu to icon for the window #2
var myMenu2 = w2.attachContextMenu();
// detach the custom context menu from the icon of the window #2
w2.detachContextMenu();
myMenu = null;

Back to top