[pygtk] How to make a transform the window type of glade object into a WINDOW_CHILD
Timo
timomlists at gmail.com
Fri Feb 25 16:58:40 WST 2011
On 22-02-11 20:23, marco at rockiger.com wrote:
> I am trying to give the fabulous text-editor Scribes some tabs.
>
> My idea was to simply create a gtk.Notebook and put all the
> editor-windows created by Scribes in this notebook.
>
> The editor-window is created with Glade.
>
> When I try to add an editor-window to the gtk.Notebook, I get the
> following error message:
>
> GtkWarning: Can't set a parent on a toplevel widget
>
>
> Now my question, how can I change the Glade-Object (aka editor-window)
> to be created as a WINDOW_CHILD?
> Is this posibble with Glade-Windows?
Wouldn't it be easier to unparent the child of the window and add this
child to the notebook?
So if you have a window with a vbox for example which holds the editor
widgets, do this in your code:
vbox = builder.get_object('vboxeditor')
vbox.unparent()
notebook.append_page(vbox)
Cheers,
Timo
>
> _______________________________________________
> pygtk mailing list pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
More information about the pygtk
mailing list