Moving objects in Tkinter

Hendrik van Rooyen mail at microcorp.co.za
Sat Oct 13 09:41:41 CEST 2007


 Evjen Halverson  wrote:

>  I have tried to make a Tkinter program make a 
> rectangle move down the window,
> but did not succeed. All it does is
> make a rectangle trail.
>  What am I doing wrong?

You are not deleting the old instances of the rectangle.
Look at the delete method of the canvas widget.
This is Gold Plated Guaranteed  (Tm)  to work.

There is an alternative too, which I have never used,
so no Gold Plated Guarantee.
Look at the coords method of the canvas widget.
It seems to let you get and set the position of 
something.

HTH - Hendrik





More information about the Python-list mailing list