hi,
On Mon, 2008-03-03 at 22:56 +0530, krishnakant Mane wrote:
> hello,
> I am creating an application where there is a menu bar and I also need
> to have a notebook on that same window.
> when any menu item is clicked the notebook will be loaded with the
> respective page.
> but when I add the menu and notebook I get the following.
> GtkWarning: Attempting to add a widget with type GtkNotebook to a
> GtkWindow, but as a GtkBin subclass a GtkWindow can only contain one
> widget at a time; it already contains a widget of type GtkMenuBar
>   self.win.add(self.notebook)
> 
> can any one tell me how to get around this?
it looks like you are trying to use the .add() method with a widget that
already has a child, to avoid this you gtk.HBox, gtk.VBox or some
container that is capable of handle more than 1 child widget.

for example

...
box = gtk.HBox()
button = gtk.Button(label="My Button")
box.pack_start(button)

label = gtk.Label("Just a label")
box.pack_start(label)
some_window.ad(box)
...

i hope to be clear ;)

regards,
-- 
Felipe Reyes A.
Estudiante de Ingeniería Ejecución Informática
Universidad de Santiago de Chile
counter.li.org #316380

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to