Python Forum

Full Version: Code snippets for building multi column Listviews and or Treeview
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have been working with another programming language for many years and I was very well used to Listview 'widgets' that had multiple column abilities as standard. I don't yet know how to overcome this using Python but i suppose that there are ways and means to achieve it.

From what i've read I intend to study Treeview widgets in Python first as this may lead onto the ability to create multiple column listviews.

Based on the attached screen clips, can anyone offer example code or snippets of code that may just accelerate my learning curve in trying to produce something similar using Python?

These are sample hierarchical material lists / bills of materials (BOMs).

[attachment=612]

[attachment=614]
What framework are you referring to because i expect most have listview and treeview widgets built in.
I am using the following.


from tkinter import *
import tkinter as tk
#import tkFont
from datetime import *
import time
from tkinter import ttk
import sqlite3
import webbrowser
from PIL import Image, ImageTk
import csv
from typing import Any
There is https://tkdocs.com/tutorial/tree.html
otherwise move to a GUI framework that has more controls as standard.