I have the following code for a ttk Treeview:
listbox = ttk.Treeview(
tab_player,
columns=('Player', 'Rating', 'Price'),
selectmode="extended",
)
listbox.heading('#0', text='Player', anchor=tk.CENTER)
listbox.heading('#1', text='Rating', anchor=tk.CENTER)
listbox.heading('#2', text='Price', anchor=tk.CENTER)
listbox.column('#0', stretch=tk.YES, minwidth=50, width=80)
listbox.column('#1', stretch=tk.YES, minwidth=50, width=20)
listbox.column('#2', stretch=tk.YES, minwidth=50, width=30)
listbox.grid(row=5, column=5, rowspan=7, sticky=W)
My insert function is as follows:
def insertitem():
GUI.listbox.insert('', 'end', values = (GUI.listbox_content.get(),
GUI.listboxr_content.get(),
GUI.listbox_content_price.get()))
When I launch my app, I have one additional column and the inserted data is not as I want (data in wrong columns).
Why is that?
