Python Gui- Help

Associate
Joined
30 Oct 2014
Posts
2,079
Location
Norfolk
Associate
Joined
21 May 2013
Posts
1,991
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:
Back
Top Bottom