I add images to wxpython treectrl items with tree.SetItemImage. Later the image shall be removed. How can I do it? I found only the SetItemImage method, I have not found anything like RemoveItemImage.

有帮助吗?

解决方案

It's not very obvious, but you can remove the item's image by calling SetItemImage and passing -1 through for the image parameter

tree.SetItemImage(node, -1)
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top