[pygtk] quit button did not show up
Sandro Dentella
sandro at e-den.it
Sun Jul 2 17:30:08 WST 2006
> "quit" button after the button with image, but the "quit" button
> did not show up...which part of my code is wrong? thanks
> ## add "quit" button
> quitbox = gtk.HBox(False,0)
> quitbutton = gtk.Button("quit")
> quitbutton.connect("clicked",lambda w: gtk.main_quit())
> quitbox.pack_start(quitbutton,1,1,2)
>
>
> self.window.add(button)
> #self.window.add(quitbox)
you are not packing quitbox anywhere..., so it will not appear. You
probably needed to comment self.window.add(quitbox), becouse GTK warned you
another GtkButton (button) was already contained in a GtkBin (the Window).
You must use HBox to house the 2 buttons.
sandro
*:-)
--
Sandro Dentella *:-)
http://www.tksql.org TkSQL Home page - My GPL work
More information about the pygtk
mailing list