Drop down MenuToolButton



Hi everyone,

I'm trying to create a drop-down menu on a toolbar using the UIManager and I can't figure it out. The documentation mentions something about specifying a Gtk::MenuToolButton as a proxy for the associated action but I'm not sure how to do that. One thing I thought was that I could manually create it like this:

Gtk::MenuToolButton* menu_button = manage(new Gtk::MenuToolButton());
menu_button->set_related_action(ref_manager_action_group->get_action("MyAction");

and then for the ui string:

<ui>...
...
<toolbar name="Toolbar">
  <toolitem action="">    <menu action="">     <menuitem action="">     <menuitem action="">     </menu>
   </toolitem>
</toolbar>
...
</ui>

Any help is appreciated!

Steve


--
Steve Holmes
M: 416-791-3868


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]