Check documentation for the latest version of dhtmlxSuite Skinning Menu DHTMLX Docs

Skinning Menu

There are two ways to set skin:

  • By passing skin name to constructor (the second argument);

  • By using the setSkin() method.

To set skin with constructor you should call dhtmlXMenuObject with the second argument, which contains skin name:

var myMenu = new dhtmlXMenuObject("parentId", "dhx_skyblue");

If you've just initiated a context menu and have no parent object yet, you can pass null as the first argument:

var myMenu = new dhtmlXMenuObject(null, "dhx_skyblue");
myMenu.renderAsContextMenu();

Also you can easily change skin "on-the-fly" using setSkin method:

var myMenu = new dhtmlXMenuObject("parentId");
myMenu.setSkin("dhx_skyblue");

Available skins are:

material (the default one)
dhx_skyblue
dhx_web
dhx_terrace

Related sample:  Skins

Back to top