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.pos = [Gtk.Orientation.HORIZONTAL,Gtk.Orientation.VERTICAL]
- self.vbox = Gtk.Box()
- self.vbox.set_spacing(5)
- self.vbox.set_orientation(self.pos[1])
- self.lb = Gtk.LinkButton("http://www.itimetux.com", "Ejemplo por Tiempo de Tux")
- self.cb = Gtk.CheckButton(label="Hola mundo")
- self.cb.connect("toggled", self.clic, None)
- self.vbox.pack_start(self.cb,True,False,10)
- self.vbox.pack_start(self.lb,True,False,10)
- self.add(self.vbox)
- 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