I'm building a Python GUI application using ttk treeviews. On Linux, when a Treeitem has child items, it displays an arrow to show that the row can be expanded. I want to hide this indicator arrow (I am using other ways to hint that the row can be expanded). How can I do this?
If I run Style().element_names()
I see that there's a Treeview element and a Treeitem.indicator element. If I run Style().configure("Treeview", padding=50)
, I see the padding style get applied when I create the treeview, so I feel confident that any style I correctly apply to Treeitem.indicator should be visible also.
Running Style().element_options("Treeitem.indicator")
, I see ('-foreground', '-indicatorsize', '-indicatormargins')
. Running Style().lookup("Treeitem.indicator", "foreground")
gives me "#000000"
, so it appears that value is initialized. If I try Style().configure("Treeview", foreground="#123456")
I don't see the indicator arrow change color, though running Style.lookup("Treeitem.indicator", "foreground")
shows me "#123456"
as expected. My plan was to set the indicatorsize to 0 to make the arrow go away entirely, but I cannot even successfully edit the color. What am I doing wrong here and is there a better way to hide the indicator? In case it matters, I'm running Python 3.5.0.