You usually inherit from a container type like GtkHBox GtkVBox or
GtkTable depending on how you want to layout your widgets.

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?
> 
> Thank you very mutch for your attention.
> 

_______________________________________________
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