[英]how to UNSELECT row in a ttk.Treeview in tkinter
Once I click into a ttk.Treeview()
and select a row, I can click another row but there is no way for me to UNSELECT
all the rows, there will always be at least 1 row selected. 单击
ttk.Treeview()
并选择一行后,我可以单击另一行,但是我无法UNSELECT
所有行,因此将始终至少选择一行。 is there a clever way to allow unselecting the last selected row? 有什么聪明的方法可以取消选择最后选择的行?
更改treeview=ttk.Treeview()
的名称,我使用treeview=ttk.Treeview()
并在按钮[UNSELECT ALL]
输入以下代码:
treeview.selection_clear()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.