Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from gi.repository import Gtk
- class Ejemplo(Gtk.Window):
- def __init__(self):
- Gtk.Window.__init__(self,title="Ejemplo")
- self.set_border_width(10)
- self.tb = Gtk.ToggleButton(label="Hola mundo" )
- self.tb.connect("toggled", self.clic, None)
- self.add(self.tb)
- def clic(self,boton,sistema):
- if boton.get_active():
- print "Hola mundo"
- ejem = Ejemplo()
- ejem.connect("delete-event",Gtk.main_quit)
- ejem.show_all()
- Gtk.main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement