Bind Text From Textbox – Python Tkinter GUI Tutorial 205

In this video I’ll show you how bind text from a textbox without a button or mouse click!

If you want to type in a text box and want that text to appear elsewhere at the same time, this is the video for you!

Python Code: age.py
(Github Code)

from tkinter import *

root = Tk()
root.title('Codemy.com - Bind Text!')
root.iconbitmap('c:/gui/codemy.ico')
root.geometry("500x500")

def labeler(e):
	my_label.config(text=my_text.get(1.0, END + "-1c") + e.char)


my_text = Text(root, width=50, height=20, font=("Helvetica", 12))
my_text.pack(pady=20)

my_label = Label(root, text="Type stuff above", font=("Helvetica", 14))
my_label.pack(pady=20)

my_text.bind("", labeler)




root.mainloop()

John Elder

John is the CEO of Codemy.com where he teaches over 100,000 students how to code! He founded one of the Internet's earliest advertising networks and sold it to a publicly company at the height of the first dot com boom. After that he developed the award-winning Submission-Spider search engine submission software that's been used by over 3 million individuals, businesses, and governments in over 42 countries. He's written several Amazon #1 best selling books on coding, and runs a popular Youtube coding channel.

View all posts

Add comment

John Elder

John is the CEO of Codemy.com where he teaches over 100,000 students how to code! He founded one of the Internet's earliest advertising networks and sold it to a publicly company at the height of...