Re: [gtkmm] Removing a widget from a container temporarily



Hello,

Sorry for the real late answer.

On Mon, 2004-02-16 at 16:43, Murray Cumming wrote:
> On Mon, 2004-02-16 at 09:21, Tor Arvid Lund wrote:
> > Samuel wrote:
> > > hpaned->remove(*viewport1);
> > > hpaned->remove(*viewport2);
> > > table->remove(*hpaned);
> > > table->attach(*viewport1, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL, 0, 0);
> > > ------------------
> > > 
> > > This segfaults at "table->attach":
> > 
> > I think if you just call viewport1->reference(); before the remove you 
> > will be OK.
> 
> That sounds less than ideal. reparent() proably does what you want. Or
> you could just choose not use manage().

Yapp, that's it. I created those widgets using libglade, which seems to
use manage() to guarantee widget destroyal.
I dropped libglade from the project now and rebuilt the interface
without manage() and everything works fine.

Thanks a lot!

-Samuel



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