简体   繁体   English

在Tkinter中更改ttk.Treeview指标图像

[英]Change ttk.Treeview indicator image in Tkinter

I'm trying to change the indicator (Expand/Collapse) image for a Tkinter (Python) Treeview. 我正在尝试更改Tkinter(Python)树视图的指标(展开/折叠)图像。 However I can't find anything in the documentation that could point me towards this or if it is even possible. 但是,我在文档中找不到任何可以指出这一点或什至有可能的东西。 Does anybody have any experience doing this? 有人有这样做的经验吗? (The arrows in the image below are the indicators) (下图中的箭头是指示器) 树状图指标

If do you mean of changing Expand/Collapse view in treeview , you have to use: 如果您要更改treeview Expand / Collapse treeview ,则必须使用:

treeview.item('item2', open = False)

The open parameter will change expand or collapse state. open参数将更改展开或折叠状态。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM