Did you know that you can navigate the posts by swiping left and right?

A stupid pygtk test

09 Apr 2012 . category: . Comments

I wanted to do dinamic entries. I did it

import gtk

class Agregar:
    def __init__(self):
        window = gtk.Window(gtk.WINDOW_TOPLEVEL)
        window.connect("destroy", gtk.main_quit, "WM destroy")
        window.set_title("Agregar")
        window.set_default_size(500,300)
        self.vbox = gtk.VBox()
        self.entry_l = []
        button_add = gtk.Button("+")
        button_add.connect("clicked", self.add_entry_cb)
        window.add(self.vbox)
        self.vbox.add(button_add)
        window.show_all()

    def add_entry_cb(self, widget, data=None):
        self.entry_l.append(gtk.Entry())
        self.vbox.add(self.entry_l[len(self.entry_l)-1])
        self.entry_l[len(self.entry_l)-1].show()

Agregar()
gtk.main()

Me

Fabián Orccón is an awesome person. He lives in Perú, the land of the Incas.