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
		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
		new window again
		self.button = Button(self.root, text="Submit", command=self.store)
		pack and make
	def store(self):
		store last self variable
		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.

6 Years
Discussion Span
Last Post by pyTony

You don't need destroy anything, what user sees need not be same as program sees. See the forget method, the opposite of pack.

Edited by pyTony: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.