Categories | Question details Back To List | ||||||||
COntextMenu : HotKey and Icons Hello, When i see my contextmenu, the icon is under the text and i can't see the hotkey. Why? This my test page : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8" /> <META HTTP-EQUIV="Last-Modified" CONTENT="0" /> <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate" /> <META HTTP-EQUIV="Pragma" CONTENT="no-cache" /> <META HTTP-EQUIV="Expires" CONTENT="Tue, 09 Nov 1996 17:44:27 GMT" /> <META HTTP-EQUIV="X-UA-Compatible" CONTENT="IE=7" /> <META NAME="Robots" CONTENT="None" /> <TITLE>DHMTLX - TreeView</TITLE> <script type="text/javascript" language="JavaScript" src="./dhtmlxMenu/sources/dhtmlxcommon.js" charset="utf-8"></script> <script type="text/javascript" language="JavaScript" src="./dhtmlxMenu/sources/dhtmlxmenu.js" charset="utf-8"></script> <link rel="stylesheet" type="text/css" href="./dhtmlxMenu/codebase/skins/dhtmlxmenu_modern_red.css" charset="utf-8"> </HEAD> <BODY> <div id="menuObj"></div> <div id='all' style='width:500px;height:500px;background-color:yellow;'> </div> <script language="JavaScript" charset="utf-8"> var menu=new dhtmlXMenuObject("menuObj","modern_red") menu.renderAsContextMenu(); menu.setImagePath("./dhtmlxMenu/codebase/imgs/"); menu.setIconsPath("./dhtmlxMenu/samples/images/"); menu.addNewChild(menu.topId,0,"copy","Copy",false); menu.setHotKey("copy","Ctrl+C"); menu.setItemImage("copy","copy.gif","copy_dis.gif"); menu.addNewChild(menu.topId,1,"cut","Cut",false); menu.setHotKey("cut","Ctrl+X"); menu.setItemImage("cut","cut.gif","cut_dis.gif"); menu.addNewChild(menu.topId,2,"paste","Paste",true); menu.setHotKey("paste","Ctrl+V"); menu.setItemImage("paste","paste.gif","paste_dis.gif"); menu.addNewSeparator("paste","s1"); menu.addNewChild(menu.topId,4,"help","Help",false); menu.setHotKey("help","F1"); menu.addContextZone("all"); </script> </BODY> </html> Answer posted by Alex (support) on Jun 10, 2009 08:39 Hello, please, try to set item images by addNewChild method without using setItemImage: menu.addNewChild(menu.topId,0,"copy","Copy",false,"copy.gif","copy_dis.gif"); We have attached the sample. The issue with setItemImage will be fixed in the next menu version Attachments (1)
|