Advertisement
hackloper775

Tablas

Oct 22nd, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.64 KB | None | 0 0
  1. from gi.repository import Gtk
  2.  
  3. class Ejemplo(Gtk.Window):
  4.  
  5.     def __init__(self):
  6.         Gtk.Window.__init__(self, title="Ejemplo")
  7.  
  8.         table = Gtk.Table(2, 2, True)
  9.         self.add(table)
  10.  
  11.         boton1 = Gtk.Button(label="Boton 1")
  12.         boton2 = Gtk.Button(label="Boton 2")
  13.         boton3 = Gtk.Button(label="Boton 3")
  14.         boton4 = Gtk.Button(label="Boton 4")
  15.  
  16.         table.attach(boton1, 0, 1, 0, 1)
  17.         table.attach(boton2, 1, 2, 0, 1)
  18.         table.attach(boton3, 0, 1, 1, 2)
  19.         table.attach(boton4, 1, 2, 1, 2)
  20.  
  21. ejem = Ejemplo()
  22. ejem.connect("delete-event", Gtk.main_quit)
  23. ejem.show_all()
  24. Gtk.main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement