Toolbar select button - submenu possible?

Hello,

I’m working with dhtmlx Toolbar 2.6 and I’m using the select button to display a simple menu - everything works fine.

Unfortunatley, there is a new requirement :wink:
I need a submenu for one of the items in the option list.

Is there any possibilty to add a submenu, and what is the correct structure for the opts-Array that is passed to the addButtonSelect() function?

Thanks in advance!


Here is my current item structure:

var opts = [
[“btn1”, “obj”, “Label 1”, “…/…/…/…/img/img_1.gif”],
[“btn2”, “obj”, “Label 2”, “…/…/…/…/img/img_2.gif”],
[“btn3”, “obj”, “Label 3”, “…/…/…/…/img/img_3.gif”],
[“btn4”, “obj”, “Label 4”, “…/…/…/…/img/img_4.gif”],

];

… and I need to add a submenu e.g. for “btn2” with 3 items.

Hello,

unfortunately, it is impossible to add submenu to the select option :frowning:

OK, I have been afraid of that, but thank you anyway :slight_smile:

My solution is to insert a separate select button with the options I need to add. This is not as nice as a submenu would be, but it’s working, and fortunately, there is enough space to do so.

I think, adding submenus would be a nice and useful feature for one of the next versions of dhtmlx Toolbar?!

We will consider this idea.

However, possible you could use menu instead of toolbar -it shows submenus.