Check documentation for the latest version of dhtmlxSuite getContextMenu DHTMLX Docs

getContextMenu

returns the context menu object attached to a window's button

dhtmlXMenuObject getContextMenu();
dhtmlXMenuObjectthe context menu instance

Example

// attach a context menu to a button of the window #1
var myMenuPark = w1.button("park").attachContextMenu();
// somewhere in a different place
var attachedMenu = w1.button("park").getContextMenu();
 
// attach a context menu to a button of the window#2
var myMenuMinMax = w2.button("minmax").attachContextMenu();
// somewhere in a different place
var attachedMenu = w2.button("minmax").getContextMenu();

Back to top