I want to insert 'Checkbutton' to 'Treeview' and associate each item to know which items selected,
like this:
how to do that?
Thanks.
like this:
how to do that?
Thanks.
[Tkinter] How to insert 'Checkbutton' to 'Treeview' and associate each item?
|
I want to insert 'Checkbutton' to 'Treeview' and associate each item to know which items selected,
like this: how to do that? Thanks.
Dec-19-2020, 03:18 PM
install ttkwidgets:
pip install ttkwidgets Then use example (comes with source): https://github.com/TkinterEP/ttkwidgets # -*- coding: utf-8 -*- # Copyright (c) Juliette Monsel 2017 # For license see LICENSE from ttkwidgets import CheckboxTreeview import tkinter as tk root = tk.Tk() tree = CheckboxTreeview(root) tree.pack() tree.insert("", "end", "1", text="1") tree.insert("1", "end", "11", text="11") tree.insert("1", "end", "12", text="12") tree.insert("11", "end", "111", text="111") tree.insert("", "end", "2", text="2") root.mainloop()
Dec-19-2020, 05:24 PM
Helpful.
|
|