from tkinter import * def p(event): window.configure(bg='green') def m(event): x = event.x y = event.y s =str(x)+' '+str(y) window.title(s) window=Tk() window.title("Python") window.geometry('400x250') window.configure(bg= '#ff5f00') t = Label(window, text="Привiт") e = Entry(window, width=20) b = Button(text="Кнопка") t.grid(column=0, row=0) e.grid(column=0, row=1) b.grid(column=0, row=2) b.bind('',p) window.bind('',m) # window.mainloop()