[pygtk] VBox in ListStore

Arie Timmerman arietimmerman at gmail.com
Thu Jan 19 00:35:49 WST 2006


I'm trying to add a VBox  to my TreeView but it doesnt work. My current 
code:

[code]
import pygtk
pygtk.require("2.0")
import gtk


class progg:
    def __init__(self):
        window = gtk.Window(gtk.WINDOW_TOPLEVEL)
        window.set_default_size(400,400)
       
        store = gtk.ListStore(gtk.VBox)
       
        box = gtk.VBox(False,5)
        button = gtk.Button("The button")
        box.pack_start(button, True, True, 5)
       
        store.append([box])
       
        cells = gtk.CellRendererText()
       
        tree = gtk.TreeView(store)
        column = gtk.TreeViewColumn("Column",cells, text=0)
        tree.append_column(column)
       
        window.add(tree)
       
        window.show_all()


if __name__ == "__main__":
    progg()
    gtk.main()
[/code]    


More information about the pygtk mailing list