Please look into the following page.
Most elements of the toolbar are loaded from XML. Only SelectButton ‘Lipa’ is created via Javascript and its List Options too.
I want to add new button to “Nowy” list of options but it does not appear.
Please look into the following page.
Most elements of the toolbar are loaded from XML. Only SelectButton ‘Lipa’ is created via Javascript and its List Options too.
I want to add new button to “Nowy” list of options but it does not appear.
XML loading is asynchronous. Therefore, you need put the snippet that added “Lipa” button into loading end handler:
toolbar.loadXML('/XMLCFG/toolbarInv.xml' ,function(){
toolbar.addButtonSelect("lipa",3,'Lipa',[]);
toolbar.addListOption("lipa","testBtn",4,"button", "Cośtam", "page_add.png");
toolbar.addListOption("newInvCor","testBtn",4,"button", "Cośtam", "page_add.png");
});
Thank you Alexandra. It works perfectly