I may have phrased the title wrong but it is what I mean. I am not looking for multiple windows at once, I am writing a script that opens a tkinter window asking for information etc etc etc and it all saves into a database after the last window. Right now I have it setup like
from Tkinter import * class gui: def __init__(self): #make self variables here def wind1(self): self.root = Tk() etc etc etc self.button = Button(self.root, text="Submit", command=self.wind2) etc etc pack and create window def wind2(self): self.infostored = self.etcetc #from wind1 self.root.destroy() create new tk window etc etc self.button = Button(self.root, text="Submit", command=self.wind3) pack and make def wind3(self): self.storemore = pass more from tk window self.root.destroy() new window again self.button = Button(self.root, text="Submit", command=self.store) pack and make def store(self): store last self variable self.root.destroy() do stuff here window = gui() window = window.wind1()
What would be the most efficient way to pass variables to a new window or in my case, create a new window but closing the current but keeping the current self.root? I tried google but to no avail I suck at googling some things like this.