1. 程式人生 > >scrolledtext插入和刪除數據

scrolledtext插入和刪除數據

root clas keyword roo int loop edt () delete

from tkinter import Tk
from tkinter import scrolledtext
from tkinter import END # 記得引入 END


root = Tk()

st = scrolledtext.ScrolledText(root)
st.insert("insert", "python")
st.delete(1.0, END) # 使用 delete
st.pack()

root.mainloop()

scrolledtext插入和刪除數據