ttk.Treeview – Insert rows with no column header

You can add rows to a treeview without specifying the columns. This will make the treeview widget look like a regular listbox widget.

# This will make it not show the column header bar at the top.
treeview_cars.configure(show="tree")

img

More code:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
treeview_cars = ttk.Treeview(self)

# Don't show the columns (makes it look like a list box)
treeview_cars.configure(show="tree")


# Add a row
treeview_cars.insert(parent="",
                     index=tk.END,
                     text="Mini Van")

treeview_cars.pack()