is there a way to detect a press of a column header of a treeview?
I actually already found a solution. When assigning the column headers there's a kwarg for a command so the code could look like this:
import tkinter as tk # Tk
import tkinter.ttk as tkk # treeview
root = tk.Tk()
# create the Treeview
tv = ttk.Treeview(root)
tv['columns'] = ('a', 'b', 'c')
tv['show'] = 'headings' #remove "#0" column
# Add column headers and Click commands
tv.heading('a', text='header a', command=lambda: print('a is pressed!')
tv.heading('b', text='header b', command=lambda: print('b is pressed!')
tv.heading('c', text='header c', command=lambda: print('c is pressed!')