Dear Lazyweb, how do I put buttons in a Gtk Menubar?

Tech Talk PSE needs a better menu bar:

+----------------------------------------------------+
| [Next slide] [Prev slide]  ...  [ V More Options ] |
+---------------------------------|                |-+
                                  | First slide    |
                                  | Last slide     |
                                  | Slides       > |
                                  |                |
                                  | Quit           |
                                  +----------------+

But how do you do this? It seems like either I want to put a regular button into a GtkMenuBar, or else put a drop-down menu button into the GtkButtonBox that we currently use to hold the next/prev buttons.

I can’t make either of these work …

4 Comments

Filed under Uncategorized

4 responses to “Dear Lazyweb, how do I put buttons in a Gtk Menubar?

  1. Casey Dahlin

    You could just use a generic container like an hbox.

    • rich

      I assume you mean that I should put my existing GtkButtonBox on the left of this hbox and a GtkMenuBar on the right? I tried something like this but couldn’t get the menubar to appear correctly.

  2. I would probably use a toolbar… you can have a toolbar button with a drop-down. It’d need a little finesse to have a sensible action for the button itself, but I can’t think of a better way to do it short of writing your own MenuButton widget.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s