Re: [gtk-list] Lack of gtk_menu_delete function




Jeremy Weatherford <xidus@xidus.net> writes:

> Heyo,
> 
> Maybe this isn't frequently needed in normal menus, but I think people
> would need it sometimes when using a GtkMenu in a GtkOptionMenu.  I know I
> could use it right now.  :)  Current solution is to make a new menu
> without the item I want removed -- less than optimal.


  gtk_widget_destroy (menuitem_you_dont_want);

It's that simple.

(You can also do:

  gtk_container_remove (GTK_CONTAINER (menu), menuitem);

But that's more complicated if you just want to get rid of
the menuitem.)

Regards,
                                        Owen



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