Tkinter 이벤트는 런타임에 실행되며 이러한 이벤트를 버튼이나 키로 바인딩하면 애플리케이션에서 이벤트의 우선 순위를 지정할 수 있는 액세스 권한이 부여됩니다.
예시
# Import the required libraries
from tkinter import *
from PIL import Image, ImageTk
# Create an instance of tkinter frame or window
win=Tk()
# Set the size of the window
win.geometry("700x350")
def show_msg(event):
label["text"]="Sale Up to 50% Off!"
# Create a label widget
label=Label(win, text="Press Enter Key" ,font="TkMenuFont 20")
label.pack(pady=30)
# Bind the Enter Key to the window
win.bind('<Return>', show_msg)
win.mainloop()에 바인딩합니다. 출력
위의 코드를 실행하면

이제
