Re: Aligning menu_item's within a menubar




> I'm attempting to make a menubar with left justified menu items, and
> a single right justified item (a help menu).

A menuitem can be right aligned using a call to
gtk_menu_item_right_justify as follows, this is in testgtk's menu
example, but you have to make the window bigger to spot it:


   menuitem = gtk_menu_item_new_with_label ("bar");
   gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem),
                                                      create_menu(4));
    gtk_menu_item_right_justify (GTK_MENU_ITEM (menuitem));
    gtk_menu_bar_append (GTK_MENU_BAR (menubar), menuitem);
    gtk_widget_show (menuitem);             

I'll try and stick this in the tutorial 'soon'.

--
E-Mail: Tony Gale <gale@daedalus.dra.hmg.gb>
>From Sharp minds come... pointed heads.
-- Bryan Sparrowhawk

The views expressed above are entirely those of the writer
and do not represent the views, policy or understanding of
any other person or official body.



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