-
Notifications
You must be signed in to change notification settings - Fork 6
CTkTreeView
Rudy edited this page Feb 21, 2024
·
1 revision

# CTkTreeView
data = [
{
'name': 'Item 1',
'children': ['Subitem 1', 'Subitem 2', {"name": "Subitem 3", "children": ["Sub-subitem 1", "Sub-subitem 2"]}]
},
'Item 2',
{
'name': 'Item 3',
'children': ['Subitem 3']
}
]
tree_view = CTkTreeView(master=app, items=data) # This will create a tree view with the specified data.
tree_view.pack(pady=20, padx=20, fill="both", expand=True) # This will pack the tree view into the app.| Parameter | Description |
|---|---|
master |
Set parent window |
items |
The data or items should be inserted to treeview, takes lists and dict |