On Mon, 2005-09-19 at 15:44 +0200, Alessandro Ferrarin wrote:
> I'm trying to create a new pygtk widget which should encapsulate some
> other ones. Then it should be encapsulated by another one, and so on.
>
> Suppose I want a widget that is composed by a label with a button.
>
> class NewWidget(XXX):
> def __init__(self, name):
> XXX.__init__(self)
> label = gtk.Label(name)
> button = gtk.Button('first')
>
> Now, I need a container to which append the label and the button!
> But XXX should be a gtk.Widget? Or a gtk.Container? Or what?
>
> Anyone have a good code example or suggestions?
http://telecom.inescporto.pt/~gjc/higcontainer.py
Caveat: needs pygtk 2.8
>
> Thank you very mutch for your attention.
>
--
Gustavo J. A. M. Carneiro
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
The universe is always one step beyond logic.
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/