Check documentation for the latest version of dhtmlxSuite attachContextMenu DHTMLX Docs

attachContextMenu

attaches a context menu to a window's button

dhtmlXMenuObject attachContextMenu(object config);
configobjectthe configuration object of the context menu
dhtmlXMenuObjectthe context menu instance

Example

// attach a context menu to a button of the window #1
var myMenuPark = w1.button("park").attachContextMenu({
    icons_path: "menu/icons/",
    xml: "menu/menu_park.xml"
});
 
// attach a context menu to a button of the window#2
var myMenuMinMax = w2.button("minmax").attachContextMenu({
    icons_path: "menu/icons/",
    xml: "menu/menu_minmax.xml"
});

Back to top