[pygtk] Deriving new classes from CanvasItem or CanvasGroup

Steve McClure sMcClure at racemi.com
Thu Nov 30 23:37:15 WST 2006


On Thu, 2006-11-30 at 17:24 +0530, Suresh Jeevanandam wrote:
> Hi,
>  Is it possible to derive new classes from the CanvasItem or
> CanvasGroup classes. I tried doing :
> 
> class MyNewItem(gnomecanvas.CanvasGroup):
>    def __init__(self):

        # did you call? Probably so but your description is
        # a little vague.
        gnomecanvas.CanvasGroup.__init__(self, rest of args)

>       # I add a number of items to self 
> 
> But this does not work when I try to add this custom item into the
> canvas. Is there any other way I should follow?
> 
> thanks.
> --
> Suresh
> _______________________________________________
> pygtk mailing list   pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-- 
Steve McClure                                   Racemi
email: smcclure at racemi.com                      380 Interstate North Pkwy, SE
voice: 404-892-5850                             Suite 250
fax: 404-892-7215                               Atlanta, GA 30339
                                                http://www.racemi.com



More information about the pygtk mailing list