dojo - set icon for dijit.MenuItem -


We have a case where we only know the icon for a menu item on the runtime. I know that the iconclass is for the parameter diji.MenuItem , but it's a bit of help until we dynamically with dojox.html.insertCssRule Adds CSS Rules to Runtime - Should be a Better Way!

Here is an example of what we are trying to do:

  pMenu = new dijit.Menu ({targetNodeIds: ["NEW_APP"], leftClickToOpen: true }); PMenu.popupDelay = 100; Pmenu.addChild (New Digit.Popmenuite ({Label: "Watches", icon SRC: "Image / Clocks."), Onclic: DojoHeich (Core Editor, Core.Editor.CreatedNewweep)});  

Of course, although an ideal approach is not ideal, something like this:

myMenuItem.iconNost.style.cssText = "background-image: url (...); width: 16px, height: 16px";


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -