Re: GtkMenu Problem
| From: | Steph | Date: | Thu, 22 Nov 2001 15:43:37 +0000 |
| Subject: | Re: GtkMenu Problem | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-676@lists.php.net to get a copy of this message | ||
Hi,
You can *either* have a GtkMenu, *or* a GtkMenuBar, but not both at the same time and in the same
space! They're just different forms of menu.
Also, if you add a menu directly to a window, you won't be able to add anything else to that
window. So add a GtkVBox to the window first, and pack_start the menu or menubar.
HTH,
Steph
----- Original Message -----
From: "Bogomil Shopov" <contact_bogomil@bitex.bg>
To: <php-gtk-general@lists.php.net>
Sent: Thursday, November 22, 2001 1:48 PM
Subject: [PHP-GTK] GtkMenu Problem
> Hello !
> Where is my mistake?
>
> .........
>
> $mbar=&new GtkMenuBar();
> $menu = &new GtkMenu();
> $menu->set_title("Main");
> $mbar->insert($menu,1);
> $mitem= &new GtkMenuItem("Connect");
> $menu->insert($mitem,1);
>
> $window->add($mbar);
> $window->show_all();
>
> Errors:
>
> Gtk-CRITICAL **: file gtkmenushell.c: line 309 (gtk_menu_shell_insert):
> assertion `GTK_IS_MENU_ITEM
> (child)' failed
>
> Gtk-CRITICAL **: file gtkbin.c: line 217 (gtk_bin_add): assertion
> `bin->child == NULL' failed
>
>
> Thank you!
>
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, e-mail: php-gtk-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-gtk-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>