#!/usr/bin/env python
#-*- coding: UTF-8 -*-
import pygtk
pygtk.require('2.0')
import gtk
class Formulario:
def __init__(self):
window = gtk.Window()
window.connect('destroy', lambda w: gtk.main_quit())
window.set_size_request(500,400)
tablec = gtk.Table(12,9,False)
labeli = gtk.Label("\tArchivo de Configuracion:")
labeli.show()
tablec.attach(labeli, 0,9,0,1)
labelc11 = gtk.Label("Dominio")
labelc11.show()
tablec.attach(labelc11, 0,5,1,2)
self.entry = gtk.Entry()
self.entry.set_text("dominio")
self.entry.show()
tablec.attach(self.entry, 5,9,1,2)
labelc21 = gtk.Label("Usuario")
labelc21.show()
tablec.attach(labelc21, 0,5,2,3)
self.entryc22 = gtk.Entry()
self.entryc22.set_text("pylau")
self.entryc22.show()
tablec.attach(self.entryc22, 5,9,2,3)
labelc31 = gtk.Label("Directorio")
labelc31.show()
tablec.attach(labelc31, 0,5,3,4)
self.entryc32 = gtk.Entry()
self.entryc32.set_text("pylau")
self.entryc32.show()
tablec.attach(self.entryc32, 5,9,3,4)
labelc41 = gtk.Label("Directorio")
labelc41.show()
tablec.attach(labelc41, 0,5,4,5)
self.entryc42 = gtk.Entry()
self.entryc42.set_text("/home/laura/proyectos")
self.entryc42.show()
tablec.attach(self.entryc42, 5,9,4,5)
labelc51 = gtk.Label("Nombre")
labelc51.set_justify(gtk.JUSTIFY_CENTER)
labelc51.show()
tablec.attach(labelc51, 0,5,5,6)
self.entryc52 = gtk.Entry()
self.entryc52.set_text("Laura Estefania Parra Rodriguez")
self.entryc52.show()
tablec.attach(self.entryc52, 5,9,5,6)
labelc61 = gtk.Label("Correo")
labelc61.show()
tablec.attach(labelc61, 0,5,6,7)
self.entryc62 = gtk.Entry()
self.entryc62.show()
tablec.attach(self.entryc62, 5,9,6,7)
labelc71 = gtk.Label("Tu llave pública")
labelc71.show()
tablec.attach(labelc71, 0,5,7,8)
self.entryc72 = gtk.Entry()
self.entryc72.set_text("")
self.entryc72.show()
tablec.attach(self.entryc72, 5,9,7,8)
labelc81 = gtk.Label("Lugar1")
labelc81.show()
tablec.attach(labelc81, 0,5,8,9)
self.entryc82 = gtk.Entry()
self.entryc82.set_text("/home/laura/proyectos")
self.entryc82.show()
tablec.attach(self.entryc82, 5,9,8,9)
labelc91 = gtk.Label("Lugar2")
labelc91.show()
tablec.attach(labelc91, 0,5,9,10)
self.entryc92 = gtk.Entry()
self.entryc92.set_text("/home/laura/proyectos")
self.entryc92.show()
tablec.attach(self.entryc92, 5,9,9,10)
labelc101 = gtk.Label("Lugar3")
labelc101.show()
tablec.attach(labelc101, 0,5,10,11)
self.entryc102 = gtk.Entry()
self.entryc102.set_text("/home/laura/proyectos")
self.entryc102.show()
tablec.attach(self.entryc102, 5,9,10,11)
buttonc1 = gtk.Button("Reset")
buttonc1.show()
tablec.attach(buttonc1, 1,3,11,12)
buttonc1.connect("clicked", self.onReset)
buttonc2 = gtk.Button("Aplicar")
buttonc2.show()
tablec.attach(buttonc2, 5,7,11,12)
tablec.show()
window.add(tablec)
window.show_all()
def onReset(self, event):
self.entry.set_text("")
self.entryc102.set_text("")
self.entryc22.set_text("")
self.entryc32.set_text("")
self.entryc42.set_text("")
self.entryc52.set_text("")
self.entryc62.set_text("")
self.entryc72.set_text("")
self.entryc82.set_text("")
self.entryc92.set_text("")
def main():
gtk.main()
return
if __name__ == "__main__":
Formulario = Formulario()
main()