Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to insert image along with ttkwidgets CheckboxTreeview #104

Open
sunny9495-dev opened this issue Mar 21, 2024 · 0 comments
Open

Comments

@sunny9495-dev
Copy link

Hi,

I tried the following code, but the checkbox is not appearing when I add the image.

from ttkwidgets import CheckboxTreeview
import tkinter as tk

root = tk.Tk()

tree = CheckboxTreeview(root)
tree.pack()
folder_image = tk.PhotoImage(file=r"../Blog Beast//UI/icons/start.png")
# file_image = tk.PhotoImage(file="page.png")
tree.insert("", "end", "1", text="1")
tree.insert("1", "end", "11", text="11", icon=folder_image)
tree.insert("1", "end", "12", text="12")
tree.insert("11", "end", "111", text="111")
tree.insert("", "end", "2", text="2")

root.mainloop()

Any help would be appreciated.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant