Hi,
You have to derive your widget class from a GTK widget. That way, your
widget inherits all necessary methods. If you want to look at some
code to see how this is done, you could look at the projects
gDeskCal and gDesklets, both on www.pycage.de. :)
Basically, it works like this:
class MyWidget(gtk.Foo):
def __init__(self):
# invoke the super constructor
gtk.Foo.__init__(self)
...
Bye, Martin Grimme
> My detailed problem:
> I want to write an application that uses many complex dialogs. These dialogs are
> recursively built up (in an XMLized way) of many smaller (but still complex)
> widgets. I want to build my own widgets, so I could create a nice tree of my
> high level widgets.
> I'd prefer adding my widgets in the usual PyGTK sytle:
>
> sub_widget.add(sub_sub_widget)
> top_widget.add(sub_widget)
>
> Instead of this plain and ugly hack (where the 'widget' member of my classes is
> the created PyGTK widget):
>
> sub_widget.add(sub_sub_widget.widget)
> top_widget.add(sub_widget.widget)
>
>
> I don't know whether it is possible or not. So please anyone drop me a line. Is
> it posibble at all from Python?
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/