Re: How to remove MenuItem from Menu?



2009/10/22 Lars Wirzenius <liw liw fi>:
* when you create and add the menu item, keep a reference to it

* when you remove it, call the function to remove a child from the
container; with the Python binding's it's just the .remove(menuitem)
method, but in C I guess it's gtk_container_remove.

Actually, you can just search for the item and destroy it with
gtk_widget_destroy(). _destroy() will automatically unlink widgets
from their containers.

John



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