How to clear/delete the contents of a Tkinter Text widget?

后端 未结 7 1347
谎友^
谎友^ 2020-12-09 01:05

I am writing a Python program in TKinter on Ubuntu to import and print the name of files from particular folder in Text widget. It is just adding f

7条回答
  •  孤街浪徒
    2020-12-09 01:29

    I think this:

    text.delete("1.0", tkinter.END)
    

    Or if you did from tkinter import *

    text.delete("1.0", END)
    

    That should work

提交回复
热议问题