Tk Canvas objects - Deletable?

Charles Y. Choi charles.choi at computer.org
Wed May 19 04:41:56 EDT 1999


>Unfortunately it doesn't.  Reading the source literally, to delete the
>Python Canvas Group object, I need to nuke the Canvas.  I want to delete
>the Canvas Group without nuking the Canvas.  (FWIW, the Group object still
>doesn't get deleted when you delete the canvas.)
>



There are two levels of deletion here; one within the Tk Canvas widget
and the other within Python.

Canvas.Group.delete() will remove elements in the Canvas as far as Tk
is concerned and not delete the Canvas.  It is likely you'll have
a corresponding Python object for each element in the Canvas that was
deleted.  You'll need to come up with a scheme to remove them.

-Charles













More information about the Python-list mailing list