Answers for "how to make enter key in tkinter"

2

bind keyboard enter key to a function using tkinter

pythonCopyimport tkinter as tk

app = tk.Tk()
app.geometry("200x100")

def callback(event):
    label["text"] = "You pressed Enter"

app.bind('<Return>', callback)

label = tk.Label(app, text="")
label.pack()

app.mainloop()
Posted by: Guest on June-24-2020
1

how to create a enter box in tkinter

canvas1 = tk.Canvas(root, width = 400, height = 300)
canvas1.pack()
Posted by: Guest on June-10-2020

Code answers related to "how to make enter key in tkinter"

Python Answers by Framework

Browse Popular Code Answers by Language