Customizer's Guide > Working with XUI (XML-based User Interface) Dialog Boxes > Working with Toolbars
  
Working with Toolbars
XUI provides limited toolbar support. You can create toolbars on dialog boxes using the <toolbargroup> and <toolbar> elements. A toolbar is made up of a collection of toolbar buttons defined with the <button> and <checkbox> elements. Other controls, such as <colordropdown>, <comboxbox>, <listdropdown> and <textbox> elements can be copied from those delivered with Arbortext Editor, but they cannot be customized. Refer to the following file for examples of the toolbars used by Arbortext Editor.
Arbortext-path\lib\dialogs\editwindow.xml
* 
Do not customize the files that ship with Arbortext Editor. Use these files as templates for site-specific files you store in your \custom directory.
Toolbar buttons invoke ACL functions using their command attributes. AOM calls and events are not supported.
You can display a XUI toolbar with the ACL function window_load_component_file() or with the AOM loadComponentFile method of the Window class.
Use the following ACL functions to control toolbars. (toolbar_id is the value of the id attribute of the <toolbar> element in the XUI file.)
Hiding and showing toolbars
dlgitem_hide(win, toolbar_id)
dlgitem_show(win, toolbar_id)
Hiding and showing a toolbar while also removing and adding the toolbar name to the View > Toolbars menu.
dlgitem_withdraw(win, toolbar_id)
dlgitem_display(win, toolbar_id)
Removing toolbars
dlgitem_remove_toolbar(win, toolbar_id)
Temporarily removing or replacing a control in a toolbar. control_id is the id attribute of the element representing the control in the toolbar.
dlgitem_withdraw(win, control_id)
dlgitem_display(win, control_id)
For example, the following function removes the Toolbar_InsertMarkup toolbar button in the Arbortext Editor toolbar toolbar2:
dlgitem_withdraw(win, 'Toolbar_InsertMarkup');
* 
When customizing toolbars using these functions, note that Arbortext Editor distinguishes between toolbar items (such as buttons and separators) by processing the value of each one’s command= attribute. Objects that have the same value for the attribute are indistinguishable for purposes of enabling, disabling, hiding, unhiding, and other kinds of manipulation, even if they have a different configuration. To ensure that objects are processed differently based on their configuration, for example to hide one separator and display the others, each object must have their command= attribute set to a different value.
For example:
<separator id="Separator-sep1" command="response('a')'"/> ... <separator id="Separator-OptionalToolBtnSeparator" withdraw="true" command="response{'b'}"/V