Re: keeping removed widget



gafferuk a écrit :
hi, for example i have a vbox and a button.

heres the code:

Gtk::VBox *box = new Gtk::VBox();
Gtk::Button *button - new Gtk::Button();

box->add(*button);


later on i wish to remove this button but i wish to keep it to be used later
on.
if i simple goes box->remove(*button) my app simply crashes.

what am i doing wrong?

thanks.
And why not just trying something like
bouton->hide();

and later if you need it again:
bouton->show();

?


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