Aligning menu_item's within a menubar



[Note: I sent this for another address, so two copies of this messsage may
 eventually show up]

This is my first attempt at a GTK (or any X program for that matter) so
bear with me.

I'm attempting to make a menubar with left justified menu items, and a
single right justified item (a help menu).  I'm new to both gtk and X
programming so I wanted to guess that I needed to create a hbox within the
menubar to align the items in the fashion I want, if possible.  Although
that doesn't seem right, since most widget packing is done via the concept
of containers, and the menubar has it's own functions, so I'm interpreting
it that the menubars are special containers.

Using the tutorial, and cross-referencing with most of the testgtk
programs, and digging through gtkmenubar.c, the only thing that I can see
that might do it directly is gtk_menu_bar_insert, with the 3rd arg being
position, but after looking through gtk_menu_shell_insert, I can see that
doesn't solve my problem.

Oh, and I took a look at the FAQ, which answered my other question, how to
make a blank within the menu.  The only thing the tutorial didn't explain
that wasn't immediately intuitive was a skeletal outline on how to setup a
dialog box to catch delete_event's and take the response from that to
determine whether to trigger the destroy event.  Otherwise, it was very
nicely done.

I dug through most of the screenshots at the gnome website as well looking
for a menubar that would do what I was planning.  Gtt (Gnome time tracker)
did have the help menu in the place that I wanted, but I didn't want to CVS
down the entire gnome package just yet, and also it seemed to use a
handlebox instead of a normal menu.

d.



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