Python Tkinter Treeview 错误解决:AttributeError: module 'tkinter.ttk' has no attribute 'treeview'
The error message 'AttributeError: module 'tkinter.ttk' has no attribute 'treeview'' suggests that the ttk module in tkinter does not have an attribute named treeview. This could be because of a typo in the code or because the ttk version being used does not support the treeview widget.
To fix the error, one possible solution is to use the Treeview class instead of treeview in the ttk module. This can be done by changing the line:
tree=ttk.treeview(window)
to:
tree=ttk.Treeview(window)
This should create a new instance of the Treeview widget and fix the attribute error.
原文地址: https://www.cveoy.top/t/topic/osra 著作权归作者所有。请勿转载和采集!