如何使用 Tkinter 清除整个 Treeview [英] How to clear an entire Treeview with Tkinter
本文介绍了如何使用 Tkinter 清除整个 Treeview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的程序使用一个 ttk.Treeview
作为表格并用许多数字填充它.
My program uses a ttk.Treeview
as a table and fills it with many numbers.
我想在按下窗口中的按钮时清除 ttk.Treeview
.
I want to clear the ttk.Treeview
when I press a button in the window.
有没有简单的方法可以清除ttk.Treeview
?
Is there a simple way to clear the ttk.Treeview
?
谢谢.
推荐答案
好的,我找到了.如果有人需要我的问题的答案,我会发布答案:
Ok, I found. I post the answer if someone need an answer to my question :
for i in tree.get_children():
tree.delete(i)
这篇关于如何使用 Tkinter 清除整个 Treeview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文