Am trying to use treeview to display results from my database. I tested treeview in a different file and it works fine but when i try to display my database results it cuts off weird.
# Works
Tree = ttk.Treeview(columns = Fields, show = "headings")
Tree.grid(in_ = self.Canvas)
# This piece of code does work
for Column in Fields:
Tree.heading(Column, text = Column.title())
# Instead of cutting at each item it cuts whenever it sees a space
for Item in Results:
print(Item)
Tree.insert('', 'end', values = Item)
Instead of each item in results it cuts off whenever it finds a space. Also when it does display the results you still see the ('text,...')
('87 Xbox Ville', 'Soham', '09458934873', 'Test3@Joshua.com')
('78 Test Town', 'Essex', '07903489451', 'Test2@Nixon.co.uk')
('58 Play Row', 'Soham', '07907849327', 'Test@Nixon.com')
These are the tuples i have (pulled from database) they work if they have zero spaces in but the address line 1 messes it up.
Please help
EDIT I printed out results and copied the output and set it as a variable and it works :/ I cant use the results?