Hi,

On a canvas I would like to bind my "player" with arrows keys, but must 
be there something wrong, cause it is not able to bind it. This is my code:

from Tkinter import *

def move(what):
    print what.keycode


master=Tk()
myCanvas=Canvas(master, bg="white")
pos=(20,20,30,30)
player=myCanvas.create_oval(pos, fill="blue")

myCanvas.focus(player)
myCanvas.tag_bind(player, "<Up>", move)
myCanvas.pack()

mainloop()

Thank you for your help.

-- 
geon
volume doprava.

_______________________________________________
Tkinter-discuss mailing list
[email protected]
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to