source: vendor/python/2.5/Demo/tkinter/matt/canvas-moving-w-mouse.py

Last change on this file was 3225, checked in by bird, 19 years ago

Python 2.5

File size: 2.1 KB
RevLine 
[3225]1from Tkinter import *
2
3# this file demonstrates the movement of a single canvas item under mouse control
4
5class Test(Frame):
6 ###################################################################
7 ###### Event callbacks for THE CANVAS (not the stuff drawn on it)
8 ###################################################################
9 def mouseDown(self, event):
10 # remember where the mouse went down
11 self.lastx = event.x
12 self.lasty = event.y
13