dhtmlxmenu - image is moved to after the text

Hi

We have a problem when using a dropdown list.

If we just add a new option like this:
templateMenu.addNewChild(null, 0, “delete_oi”, “Remove Object Instance”, false, “Remove.png”);

then the image is before the text.

but if we on an event use this code:
templateMenu.setItemDisabled(“remove_s”);
or
templateMenu.setItemEnabled(“delete_oi”);

then the image is moved to after the text.

We are using dhtmlxSuite_v25_pro_91111 and run on Firefox and IE7

BR
Staffan

Hi,

try to define the “disabled” image too:

templateMenu.addNewChild(null, 0, “delete_oi”, “Remove Object Instance”, false, “Remove.png”, “Remove.png”);

then the image is moved to after the text.

the problem doesn’t occur in the latest development version (attached).
dhtmlxmenu.zip (16.8 KB)

Hi,

Thanks it works with your suggested solution. Think i misunderstood the api description.

Great!

/Staffan