Re: Creating a widget with glade without a window
| From: | Alan Knowles | Date: | Tue, 23 Jul 2002 04:05:02 +0000 |
| Subject: | Re: Creating a widget with glade without a window | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-2277@lists.php.net to get a copy of this message | ||
you need to detach(remove) the vbox etc. from it's parent
$parent = $vbox->parent;
$parent->remove($vbox);
before you can add it to another item.
dont forget to hide the original window in glade, and to show it after you've added it to another part.
I think the second item root, can be used to grab a section of a glade file - although I only did a few failed tests at getting this to work. -
It would be usefull to work out if this actually works (try cvs.gnome.org - lxr and search for glade_xml_new, that uses root as something other than NULL)
|GladeXML <http://gtk.php.net/manual/en/glade.gladexml.constructor.php> |(string /fname/, [string /root = NULL/, [string /domain = NULL/]]);
regards
alan
Roberto Villarreal wrote:
Hi, i am trying to create a Widget (vbox) with some other widgets in it but i dont want it attached to any window so I can do something like this:$this->glade_main = &new $class('main.glade');$main_window = $this->glade_main->get_widget("main_window");$main_vbox = $this->glade_main->get_widget("main_vbox"); $this->glade_tasks = &new $class('tasks.glade'); $vbox = $this->glade_tasks->get_widget("vbox1"); $main_vbox->pack_start($vbox); $main_window->show_all(); What i want is to have my main.glade window with a menu, an statusbar, an scrolled window in it and all of the others "modules" like tasks in another .glade file that i just need to pack_start them to the scrolled window (or a vbox) Hope you understand me... Thank you in advance