Next: , Previous: , Up: Widgets   [Contents]


4.7 Menubar

The <menubar></menubar> defines menu bar which can be placed as any other screen elements. In the menubar widget you have to create menus with the <menu></menu> tag, and inside the menu must be at least one menu item created by the <menuitem></menuitem> tag.

The next example shows how to create a simple menubar with only one menu:

<menubar>
  <menu>
    <menuitem>
      <label>gtk-open</label>
    </menuitem>
    <menuitem>
      <label>gtk-save</label>
    </menuitem>
    <menuitem>
      <label>gtk-quit</label>
      <action>EXIT="quit"</action>
    </menuitem>
    <label>File</label>
  </menu>
</menubar>