Different skins behace differently

Hi Guys,

This is my first post, so hello.

I am just starting to play with the menu widget. I am loading the menu straight from the example code - just to see the effect. There are four skins. The first one I tried was:

dhtmlxmenu_dhx_skyblue.css

This gives me a nice menu with three options at the top:

File Edit Help

and there are sub options too, which is great - all working as I had hooped.

I declare this skin as a css like this:

<link href="../../Client/Menu/CSS/dhtmlxmenu_dhx_skyblue.css" rel="stylesheet" type="text/css" />

However, when I tried the next skin to see what that looked like - dhtmlxmenu_dhx_web.css

I get this

File
Edit
Help

And when I move the mouse over them the sub options appear on the left briefly and the whole page jumps.

Any thoughts?

May tanks in advance,

S

Hi,

make sure that you have defined dhx_web skin. dhx_skyblue is default. So, there is not need to set it. Other skins you should set either in constructor or by setSkin method:

menu = new dhtmlXMenuObject(“menuObj”, “dhx_web”);
or
menu.setSkin(“dhx_web”);

Thanks Alexander.

It turns out that I did not have the css file declared:

dhtmlxlayout_dhx_black.css

… for the “dhx_black” layout.

When I declared it, things were fine. However, this leaves me a little confused because I am using the compressed libCompiler CSS and JS files:

dhtmlx.css
dhtmlx.js

I had thought that they included all skins. Have I got that wrong?

Many thanks again.

S

dhtmlx.css includes only chosen skin. The specific skin should be included separately.

Yes, thank you Alexandra - I realise that now.

However, I am still thinking that giving the user a choice of skins might be nice for them.

I am using libComposer.

I am thinking of giving them a drop down box of the skins. When they select one, I could reload the page with the css pointing to the correct skin directory. I would also take a variable of the correct images folder and use that to setImagePath; and lastly, I would input the skin as a parameter to items like setskin and when creating new layouts etc.

It is not high on my list of priorities, but does that sound like it could work?

Many thanks,

S