muppet wrote:
anguila wrote:Yes, but I can't create a new widget over them.. If I create a vbox in a place I can't (i don't know how) create a new widget at the same place to toggle with other widget. I know the visibility option, the idea is switch with widgets, but if I can't create new widgets at the same spot i can't hide those widgets.Try this: * create a new window * put a vbox in it * put a toggle button in vbox * put a new vbox (vbox1) inside vbox, with some stuff inside * put another new vbox (vbox2) also inside vbox, with different stuff inside * set vbox1 visible * set vbox2 !visible * in the handler for the togglebutton's toggled signal, toggle the visible properties of both vbox1 and vbox2. * do *not* use show_all() on the toplevel window!
I've attached a script and glade file that does exactly this, for demonstration. -Ken
Attachment:
gtk2_switch_hide.glade
Description: application/glade
Attachment:
gtk2_switch_hide.pl
Description: Perl program