Code:
from tkinter import * window = Tk() c = Canvas(window, width=960, height=720) c.pack() plita = c.create_rectangle(400,690,545,715,fill='grey') c.bind_all('KeyPress-a', c.move(plita, 0, -1)) Code:
from tkinter import * window = Tk() c = Canvas(window, width=960, height=720) c.pack() plita = c.create_rectangle(400,690,545,715,fill='grey') c.bind_all('KeyPress-a', c.move(plita, 0, -1)) Source: https://ru.stackoverflow.com/questions/830154/
All Articles