Tkinter question

Adonis deltapigz at
Wed Aug 21 17:16:53 EDT 2002

i have an object and wish to click it and drag it to X position, but the
code works somewhat, but the movement is strange, i have tried to place
update_idletasks() to moveObject, but it did little, i have googled around,
but could not find any working code.

any help is greatly appreciated.


-- code --

# code is not kosher, it was just whipped up on the fly

from Tkinter import *

def moveObject(event):, y=event.y)

root = Tk()
root.geometry("%dx%d%+d%+d"%(640, 480, 0, 0))
b = Button(root, text="foobar"), y=1)
b.bind('<B1-Motion>', moveObject)

More information about the Python-list mailing list