Johan Dahlin wrote:

> You need to call gobject.type_register(YourGtkWidgetSubclass) or set the
> class variable __gtype_name__ among other things.
> 
> For a complete example, look at the widget.py:
> 
>
http://svn.gnome.org/viewcvs/pygtk/trunk/examples/gtk/widget.py?view=markup
> 
> Hope this helps.

Yes, it does.  Your citation was what I was looking at, but I didn't
understand that I needed to replicate so much.  Wow, it's really
complicated subclassing in GTK.

I still don't understand what to do if my widget is composed of other
widgets (rather than Cairo drawing and text).  A simplification of what I
am trying to do is to create a widget with two buttons.  I guess that I
need to do something different in do_expose_event and do_size_request, but
I'm not sure what.  To begin with, it isn't clear to me what the do_
methods are.  Do they override event handlers in the abstract Widget class? 
I don't see documentation for them there.  I tried calling do_realize and
do_expose_event on the button, but those calls fail (although the methods
apparently exist).
-- 
Jeffrey Barish

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

Reply via email to