I've tried using the after/time.sleep to update the treeview, but it is not working with the mainloop.
My questions are:
- How can I update the treeview widget with real-time data?
- And is there a way that I can change all treeview children simultaneously? (I don't want to delete all children and insert again)
Script 1:
class mainwindow(tk.Tk):
#Initalize main window
def __init__(self, *args, **kwargs):
tk.Tk.__init__(self, *args, **kwargs)
#use to shift frames
....
if __name__ == "__main__":
...
app = mainwindow()
app.geometry("1920x1080")
app.mainloop()
Script 2:
class Page_one(tk.Frame):
def __init__(self, parent, controller):
mainframe=tk.Frame.__init__(self, parent)
self.controller = controller
#treeview widget attached to page_one
tree1=Treeviews(...)
tree1.place(x=880,y=25)
#Question1: How can I update the treeview widget with real-time data?
#Question2: is there a way that I can change all treeview children simuteniously? (I dont want to delete all children and insert again)
My question is: may someone show me a structure that I could use for updating widgets in my second script.