Re: [gtk-list] Re: removing widgets, changing the layout. UNPACK?



> On 22 Sep, Owen Taylor wrote:
> >> Is possible to remove a widget after I have used it?
>
> Let me explain.  My Apps layout is something like this:
> 
> 	Remove the HANDLEBOX from HBOX
> 	Remove the HPANE from the VBOX
> 	PACK the HANDLEBOX in the VBOX
> 
> It appears to be all right, but the SUBTREEs disapears.
> Just my ROOT_TREE_ITEM shows there.
> 

Personally I just call Gtk::Widget->show and Gtk::Widget->hide functions to add and remove
items from the visible display.  That way you don't have to rebuild the widgets, (like you
would after a ->destroy) and any routines you have or children you have that refer
to the Widget won't get messed with.  (However, calling Gtk::Widget->hide will hide
the Widget, AND it's children)

I also see that you are moving an item from one widget to the other, no problem, use
Gtk::Widget->reparent

-Steve



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