टिंकर इवेंट को रनटाइम पर निष्पादित किया जाता है और जब हम इन घटनाओं को एक बटन या कुंजी से बांधते हैं, तो हमें एप्लिकेशन में ईवेंट को प्राथमिकता देने के लिए एक्सेस मिल जाएगा।
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() से बाइंड करें आउटपुट
उपरोक्त कोड को चलाने पर एक विंडो प्रदर्शित होगी जो

अब,
