Menu items/menubar on toy menu program default to size of entire window?!?!?

Here is the menu parts of my code.  It compiles and runs
great without errors except that
The menu items, which are "File" and "Help" are huge
vertical buttons instead of small buttons on a small
horizontal menu bar.  What determines size of menu items
and what makes them to take up all vertical space by


static GtkItemFactoryEntry theMenu[] = {
  {"/_File",            NULL, NULL,            0, "<Branch>"},
  {"/File/_New",        NULL, printHelloWorld, 0, "<Item>"},
  {"/File/<Separator>", NULL, NULL,            0, "<Separator>"},
  {"/File/_Quit",       NULL, gtk_main_quit,   0, "<Item>"},
  {"/_Help",            NULL, NULL,            0, "<LastBranch>"},
  {"/Help/_See Docs",   NULL, NULL,            0, "<Item>"},
  {"/Help/_About",      NULL, NULL,            0, "<Item>"},


  accel = gtk_accel_group_new();
  item_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<main>", accel);
  gtk_item_factory_create_items(item_factory, sizeof(theMenu) / sizeof(theMenu[0]), theMenu, NULL);
  gtk_accel_group_attach(accel, GTK_OBJECT(window));
  gtk_container_add(GTK_CONTAINER(window), gtk_item_factory_get_widget(item_factory, "<main>"));

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

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]