Hello,
I am trying to apply a context menu to dhxTree and dhxFolder at the same page (both attached to dhxLayout)
the code I am using is below
dhxTreeMenu = new dhtmlXContextMenuObject(‘120’, 0, “standard”);
dhxTreeMenu.menu.loadXML("^CLIENTDIR^xml/context.xml");
dhxTreeMenu.setContextMenuHandler(onButtonClick_Tree);
dhxTreeMenu.setOnShowMenuHandler (changeMenu_Tree);
dhxTree.enableContextMenu(dhxTreeMenu); (dhxTree is already initiated)
and
dhxFolderMenu = new dhtmlXContextMenuObject(‘120’, 0, “dhx_blue”);
dhxFolderMenu.menu.loadXML("^CLIENTDIR^xml/context2.xml");
dhxFolderMenu.setContextMenuHandler(onButtonClick_Folder);
dhxFolderMenu.setOnShowMenuHandler(changeMenu_Folder);
dhxFolder.enableContextMenu(dhxFolderMenu); (again, dhxFolder is already initiated)
is there anything I am doing wrong? because currently, the result is that, the style (standard and dhx_blue) are not being applied to the context menu
also, where can I find more example about context menu, the sample page all seemed to mention dhxMenu and not much example given for ContextMenu
Thanks in advance
Which version of dhtmlxMenu you are using?
To work correctly within layout and use new skins, you need to use dhtmlxMenu 2.0, but according to used syntax, you are using dhtmlxmenu 1.0
I am using version 2.0
the code was written a long time ago by other people, and I am trying to attach the same code onto version 2.0 dhxLayout,
where can I find example I should use for this task?
Thanks in advance