Re: hide or better delete elements in GtkMenu



Andreas Madsack wrote:

Hello,

In my App I add dynamically Menu-entries.
Adding is no problem, but how can I delete or hide them later?

you have a couple choices. you can keep track of the pointers to the GtkMenuItems, or you can get a child list by using gtk_container_get_children() on the parent GtkMenu. for hiding, just call gtk_widget_hide() on the pointer to the GtkMenuItem, and for removing, just use gtk_container_remove(), using the parent GtkMenu for the first argument.

   -brian



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