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")
- table = Gtk.Table(2, 2, True)
- self.add(table)
- boton1 = Gtk.Button(label="Boton 1")
- boton2 = Gtk.Button(label="Boton 2")
- boton3 = Gtk.Button(label="Boton 3")
- boton4 = Gtk.Button(label="Boton 4")
- table.attach(boton1, 0, 1, 0, 1)
- table.attach(boton2, 1, 2, 0, 1)
- table.attach(boton3, 0, 1, 1, 2)
- table.attach(boton4, 1, 2, 1, 2)
- ejem = Ejemplo()
- ejem.connect("delete-event", Gtk.main_quit)
- ejem.show_all()
- Gtk.main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement