Re: Moving widgets from one parent to another...?
- From: Paul Davis <pbd Op Net>
- To: John Breen <locutus borg apana org au>
- Cc: gtk-list gnome org
- Subject: Re: Moving widgets from one parent to another...?
- Date: Tue, 19 Mar 2002 19:57:10 -0500
gtk_widget_ref (vbox2);
> gtk_container_remove(GTK_CONTAINER(window2), vbox2);
> gtk_container_add(GTK_CONTAINER(vbox1), vbox2);
gtk_widget_unref (vbox2);
by default, when you add a widget to a container, the container
takes ownership of the widget. when you then remove it, it takes
responsibility for deleting it.
adding a reference will stop this.
you can also use gtk_widget_reparent() to hide all this, IIRC.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]