Even though my Treeview has the option takefocue=False
, the text in the cells is still taking focus somehow. Specifically the text column when I do tree.insert('', tk.END, text='Some Text', values=5)
is taking focus, meaning there is a dashed line around Some Text
. I was able to find this resource, but I am not sure of the layout string I need to change.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
According to the Tcl/Tk wiki, the following 5 styles can be used to customize a
ttk.Treeview()
widget:Using
.layout()
, you can retrieve the layout specifications of each style:It turns out that the
"Treeview.Item"
style has a"Treeitem.focus"
layout mark. If you comment it out when overwriting the layout, the focus drawing behavior (and the dashed line) will disappear: