📜  明文框 tkinter python 代码示例

📅  最后修改于: 2022-03-11 14:47:10.897000             🧑  作者: Mango

代码示例1
# Import Module
from tkinter import *
 
# Create Object
root = Tk()
 
# specify size of window.
root.geometry("400x500")
 
# delete content from Text Box
 
 
def delete_text():
    T.delete("1.0", "end")
 
 
# Create text widget
T = Text(root)
T.pack()
 
# Create Delete Button
Button(root, text="Delete", command=delete_text).pack()
 
# Execute Tkinter
root.mainloop()