Re: Gtk::Widget::destory() ?




> The way to do this is when you create your progress bar, do it like
> this: 
> 
> Gtk::Progressbar* pbar = Gtk::manage( new Gtk::ProgressBar() ) ;
> 
> vbox->add( *pbar ) ;
> 
> ..../* Magically time passes */...
> 
> vbox->remove( *pbar ) ;
> 
> At this point it should be destroyed automatically. 

No, child widgets are not destroyed when you remove them (well, since we
fixed that bug, in 2.6 or 2.8). That would be quite random.

They _are_ destroyed, if they are managed, when the parent container is
destroyed, if the child is _still_ a child of that parent.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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