Re: [gtkmm] Question to removal of MenuItems



menulist = menu->get_items() is a standard iterator and you can
erase/clear items! Depending on the application it can be easier to
clear() and rebuild .... but often insert/erase are fine! You can even
menu->reorder_child(...) and if you want to just change text of an
element then do the following:
Gtk::Label *myLabel =
dynamic_cast<Gtk::Label*>(menulist[j].get_child());
myLabel->set_text("new text");


Diana Esch-Mosher


On Wed, 2004-02-11 at 05:04, Andreas B. Thun wrote:
> Hi!
> 
> Is there a possibility to remove an existing
> MenuItem or must I rebuild the whole Menu?
> 
> 
> Thx in advance,
> Andi
> 
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
-- 
Diana Esch-Mosher <desch-mosher lanl gov>
Los Alamos National Laboratory




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