Python Gui- Help

Associate
Joined
30 Oct 2014
Posts
2,081
Location
Norfolk
From the error message it looks like you've created a table element with two columns in (Book Title, Book Author) but you are trying to access the third column (which doesn't exist).

Do you have access to the element properties when designing the GUI? Forgive me, but I'm unfamiliar with Python so I don't really know what tools you're working with.

edit: found the docs here -> http://www.tkdocs.com/tutorial/tree.html

Have you tried explicitly defining the columns when constructing the tree view? The docs also suggest that you need to pass a parent element when constructing the tree view.

Like:

tree = ttk.Treeview(root, columns=('col one', 'col two', 'col three', 'another col'))
 
Last edited:
I don't think he's shared all the of the code because there's no import for tkinter so it's hard to see exactly what else is going on.
 
Back
Top Bottom