On Fri, 2005-04-08 at 02:21 +0300, Osmo Salomaa wrote: > I've been reading some old posts on the list about problems with > creating custom cell renderers. > > After those posts has happened the following: > > "ANNOUNCE: PyGTK 2.6.0 > ... > GInterfaces can now be implemented. > Overriding GTK+ virtual methods is now supported." > > If I understood correctly these two were the reasons why one couldn't > subclass CellRendererText and override the 'start_editing' method or use > a TextView that implements CellEditable as the editing widget in a > custom cell renderer? Can these tasks now be done?
It depends. The two statements are a bit optimistic :-) It means the infrastructure is there to implement interfaces and override gtk+ virtual methods. However, some interface and virtual method "proxies" cannot be automatically generated (yet) and need manual coding, thus not all proxies have been implemented, which means you have to check, case by case, if what you want to do is possible. In your specific case, yes, you can implement GtkEditable interface. To do so, you have to add gtk.Editable to base classes, and implement the interface methods. For each interface method <foo>, you have to implement a corresponding method do_<foo> in your class. Then call gobject.type_register(MyClass). Regards. -- Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> The universe is always one step beyond logic.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
