#!/usr/bin/env python2


import pygtk
import gtk


class Base:
    def __init__(self):
        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
        self.window.connect("delete_event", self.delete_event)
        self.window.show()

        self.combobox = gtk.combo_box_new_text()
        self.comboboxentry = gtk.combo_box_entry_new_text()

        for i in range(100):
            self.combobox.append_text("item number {}".format(i))
            self.comboboxentry.append_text("item number {}".format(i))

        self.combobox.set_active(50)
        self.comboboxentry.set_active(50)

        self.vbox = gtk.VBox()
        self.vbox.pack_start(self.combobox, True, False, 0)
        self.vbox.pack_start(self.comboboxentry, True, False, 0)
        self.combobox.show()
        self.comboboxentry.show()
        self.vbox.show()

        self.window.add(self.vbox)

    def delete_event(self, widget, event, data=None):
        gtk.main_quit()
        return False

    def main(self):
        gtk.main()


if __name__ == "__main__":
    base = Base()
    base.main()
