5. Adding a vertical tool bar
Prev | Chapter 2. Tutorial | Next

## 5. Adding a vertical tool bar

tutorial/tutorial5.xxe_gui:

      <toolBar name="toolBar" helpId="toolBar">
        <action name="newAction" />
        <action name="openAction" />
        <action name="saveAction" />
        <action name="saveAllAction" />
        <action name="toggleUseURLChooserAction" />
        <separator />
        <action name="undoAction" />
        <action name="redoAction" />
        <action name="repeatAction" />
        <action name="commandHistoryAction" />
        <separator />
        <action name="cutAction" />
        <action name="copyAction" />
        <action name="pasteBeforeAction" />
        <action name="pasteAction" />
        <action name="pasteAfterAction" />
        <action name="deleteAction" />
        <separator />
        <action name="splitAction" />
        <action name="joinAction" />
      </toolBar>

      <toolBar name="configSpecificToolBar">
        <toolBarItems name="configSpecificToolBarItems" />
      </toolBar>

      <layout label="Document Editor" icon="docedit.png">
        <insert />

        <leftToolBars>
          <toolBar name="configSpecificToolBar" />
        </leftToolBars>
     </layout>

| There is no facility similar to the `<insert/>` which would allow us to remove the set of configuration specific buttons from the standard tool bar. Therefore we have to redefine the standard tool bar (element `toolBar` called "`toolBar`" found in common.xxe_gui) from scratch.
| Declare a new tool bar called "`configSpecificToolBar`" by using a toolBar element.
| This new `toolBar` only contains the set of configuration specific buttons. This set is declared in common.xxe_gui as the toolBarItems element called "`configSpecificToolBarItems`". Therefore, we just need to reference this stock part in our new tool bar.
| Add a leftToolBars child to the layout element. This child element can contain one or more vertical `toolBar`s.

Prev | Up | Next
4. Adding a preferences sheet for the word count tool | Home | 6. Making File → Print dependant on the type of the document to be printed