I don't think you can have a widget have two parents
simultaneously.
If you don't need both versions of the widgets visible simultaneously
then what you can do is reparent widgets from one frame to another.
In this way, you could allow the user to toggle between the views and
just reparent the widgets you want in both views.
The specific case of re-parenting between notebook pages is a bit
tricky -- you can't reparent direct to a notebook page, only to an
existing frame, so you need to create a new frame, reparent to that and
then attach the frame to the relevant notebook page.
John
[EMAIL PROTECTED] wrote:
[pygtk] Sharing a notebook and a statusbar in two gtk windows
Hi list,
I want to share a notebook and a statusbar in two
gtk windows as this
components are same for the two windows.
The notebook will display lots of canvas, and i want
to optimize the
memory use as there canvas won't be modify. That's why
i decided to
create a shared notebook and a share statusbar.
I saw several times this error without succeeding
in finding the cause.
I found it is not possible for a widget to be part of
two windows due to
the test child->parent == NULL.
Can't we put a widget as a children for two parents?
If no, how can i have same notebook and statusbar in
both windows
without eating two much mermory and without having
problem to
synchronize them.
Note: i need both windows because one is simplier
and for quick access
and the other is for more heavy use.
The error i get is:
H:\Philippe\Pyvisu\Code
Source\eclipse\workspace\pyvisu\ihm\window.py:110:
GtkWarning:
gtk_box_pack_start: assertion `child->parent ==
NULL' failed
vbox.pack_start(statusbar, True, True, 0)
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
|
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/