menu bar *vertical* by default!!! How did that happen?



I just ran following test code for GTK+ menus
and noticed that menu bar is vertical and along
the left side of window!!!!!  How did this become
the default setting!?!?!? How fix this?!?!

Chris

#include <gtk/gtk.h>

int main(gint argc, gchar** argv) {

   GtkWidget* window;
   GtkWidget* menubar;
   GtkWidget* item1;
   GtkWidget* item2;
   GtkWidget* menu;

   gtk_init(&argc, &argv);

   window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
   gtk_window_set_default_size(GTK_WINDOW(window), 180, 25);

   menubar = gtk_menu_bar_new();
   gtk_container_add(GTK_CONTAINER(window), menubar);

   item1 = gtk_menu_item_new_with_label("Test1");
   gtk_menu_bar_append(GTK_MENU_BAR(menubar), item1);

   menu = gtk_menu_new();
   item2 = gtk_menu_item_new_with_label("Test2");
   gtk_menu_append(GTK_MENU(menu), item2);
   gtk_menu_item_set_submenu(GTK_MENU_ITEM(item1), menu);

   gtk_widget_show_all(window);
   gtk_main();

   return 0;
};

-- 
_______________________________________

Dr. Christian Seberino
SPAWAR Systems Center San Diego
Code 2363
53560 Hull Street
San Diego, CA 92152-5001
U.S.A.

Phone: (619) 553-7940
Fax:   (619) 553-2836
Email: seberino spawar navy mil
_______________________________________



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