[pygtk] Drawing widgets in a custom cellrenderer
F Wolff
friedel at translate.org.za
Fri Dec 7 15:12:30 WST 2007
Hi list.
I'm doing a custom cellrenderer similar to this FAQ entry:
http://faq.pygtk.org/index.py?req=show&file=faq13.045.htp
As part of my rendering I want to display a normal gtk.Widget (a
container, in my case), but I fail to see how to display it correctly.
By following the FAQ entry, I get this:
def on_render(self, window, widget, background_area, cell_area, expose_area, flags):
self.widget.draw(window, widget, cell_area.x, cell_area.y)
TypeError: GtkWidget.draw() takes exactly 1 argument (4 given)
(by the way, why isn't the gtk.Widget.draw() method documented?)
I guess another issue is that my self.widget isn't added to some parent
anywhere, but I don't see where/how it could/should be done (somewhere
in the treeview?).
Can somebody perhaps shed some light on the matter (and perhaps expand
the FAQ entry if needed)?
Thanks
Friedel
More information about the pygtk
mailing list