Hi,

When trying to inherit from goocanvas.Table the do_update method is
never called (see the example code below). Any idea why that does not
work? I looked at the custom widget demos shipped with goocanvas, but
they only write a widget from scratch, not a way to manipulate the
behavior of an existing widget.

-Samuel


----------------------
import gtk
import goocanvas

class CustomTable(goocanvas.Table):
    def do_update(self, recursive, cr):
        print "do_update() called"
        goocanvas.Table.do_update(self, recursive, cr)

window = gtk.Window()
canvas = goocanvas.Canvas()
table  = CustomTable()
canvas.get_root_item().add_child(table)
table.add_child(goocanvas.Text(text = "Hello World"))

window.add(canvas)
window.set_size_request(200, 200)
window.show_all()

window.connect('delete-event', gtk.main_quit)
gtk.main()


_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to