Moving things in Tkinter

Greg Ewing greg at cosc.canterbury.ac.nz
Mon May 6 23:09:10 EDT 2002


Peter Scott wrote:
> 
> I want to
> make a program where there are several small icons, and by clickin and
> dragging with the mouse you can move them to a different location.

Sounds like a job for a Canvas widget. Add images
to the Canvas, and bind event handlers to the
images which detect clicking and dragging and update
their positions accordingly.

-- 
Greg Ewing, Computer Science Dept, University of Canterbury,	  
Christchurch, New Zealand
To get my email address, please visit my web page:	  
http://www.cosc.canterbury.ac.nz/~greg



More information about the Python-list mailing list