You can easily attach pop-up to any toolbar button (button, roundbutton, nextbutton, prevbutton).
Full code of the example in the picture (including XML structure).
This calls for just 2 things:
The first one: create popup object and make it invisible.
dhx.ui({ view:"popup", id:"Menu1", body:{ view:"list", url:"xml/menu.xml", datatype:"xml", select:true, y_count:3 } }).hide();
The other: define toolbar button (you'd like attach popup to) and set the parameter popup to the desired popup object (in our example, it's “Menu1”).
If you want, you can specify which side the pop-up will appear from: right, center or left (popup:“Menu1, right”). The default value is “center”.
dhx.ui({ rows:[ { view:"toolbar", type:"MainBar", data:[{ type:"button", label: "Menu", popup:"Menu1, left"}] }] ... })
That's all the code you need. Just unite 2 code snippets and the popup button is ready.