Re: Detach a widget from container

>  I have the following problem. I have a container widget (a vbox) and a
>widget packed into this container:
>    gtk_container_add(GTK_CONTAINER(container),vbox);
>  I need to detach the vbox from the container without destroying it. I
>tried first the gtk_container_remove(), but it destroys the child
>widget. Do you know, how could I do it? I need the widget later for
>inserting into another container, and it would be terrible waste of time,
>if I'd have to destroy it and then later create it again...

Take a look at "reparent" test's code in gtk/testgtk.c in gtk+
distribution. IMHO this example does exactly what you want.

Vladimir V. Tsichevski
senior expert

                  Jet Infosystems
Krasnoproletarskaya 6,		Tel. (+7 095) 972-1182
Moscow 103006, Russia		Fax  (+7 095) 972-0791
Any opinions or recommendations herein are those of
the author and not of his computer.

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