Answers for "Delete Tkinter Text Box's Contents"

0

Delete Tkinter Text Box's Contents

import tkinter as tk
root = tk.Tk()
root.geometry("400x240")

def clearTextInput():
    textExample.delete("1.0","end")

textExample=tk.Text(root, height=10)
textExample.pack()
btnRead=tk.Button(root, height=1, width=10, text="Clear", 
                    command=clearTextInput)

btnRead.pack()

root.mainloop()
Posted by: Guest on January-05-2021

Code answers related to "Delete Tkinter Text Box's Contents"

Python Answers by Framework

Browse Popular Code Answers by Language