I can see a very small part of a context menu when I right-click on a tree, but that’s it - I can’t see any of the text or icons. Can you point out what I’m missing? This is my code:
<body onload=“doOnLoad()”…>
Hello,
what menu version do you use ? the code, that you’ve provided, corresponds to menu 1.0 (the previous version). The latest version has different API and libraries. The samples can be found in the tree package: dhtmlxTree/samples/context_menu/
If using menu 1.0 is premeditated, please provide the sample to recreate the issue as the code looks correct.
Thanks for the prompt reply, Alex. I got it working by looking at the examples, and I didn’t need the javascript sources I had previously included. This is the change I made to get it working.
.
.
myMenu = new dhtmlXMenuObject(null);
myMenu.setImagePath(“dhtmlx/imgs/”);
myMenu.setIconsPath(“dhtmlx/imgs/”);
myMenu.renderAsContextMenu();
myMenu.setOpenMode(“web”);
myMenu.attachEvent(“onClick”, treeMenuClick);
myMenu.loadXML(“dhtmlx/_context.xml”);
.
.
myTree.enableContextMenu(myMenu);