Skip to content

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

Description

@sunny9495-dev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions