[pygtk] How to refill a container?

nielinjie nielinjie at gmail.com
Sun Aug 31 23:23:19 WST 2008


Hello list:
I am trying to refill a container (a VBox in my case), saying that I
want to remove all child from the container and then add some ones
else. Here is my code.

        self.vbox.foreach(lambda widget:self.vbox.remove(widget))
        i=0
        for every in myList:
            frame=gtk.Frame()
            widget=gtk.Label()
            frame.add(widget)
            self.vbox.pack_start(frame)

removing looks works, old children disappeared, but new ones does not
appear... :-(
Is there any method like 'redraw' needed to be call?

Thanks for any help...:-)


More information about the pygtk mailing list