Apr-12-2021, 06:03 PM
This may help you figure out what you are looking for.
A splash screen will show and close automatically after a delay, then the main window that has a button to open up a second window.
A splash screen will show and close automatically after a delay, then the main window that has a button to open up a second window.
import tkinter as tk class TkApp(tk.Tk): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.geometry('300x300') tk.Label(self, text='MainFrame').pack() tk.Button(self, text='SecondFrame', command=self.on_button).pack() self.create_splashframe() def create_splashframe(self): splashframe = SplashFrame(self) self.withdraw() self.wait_window(splashframe) self.deiconify() def on_button(self): secondframe = SecondFrame(self) self.withdraw() self.wait_window(secondframe) self.deiconify() class SplashFrame(tk.Toplevel): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) tk.Label(self, text='SplashFrame').pack() self.geometry('200x200') self.overrideredirect(True) self.after(3000, self.destroy) class SecondFrame(tk.Toplevel): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.geometry('300x300') tk.Label(self, text='SecondFrame').pack() tk.Button(self, text='Close', command=self.destroy).pack() tk_app = TkApp() tk_app.mainloop()Note this post is going off-topic, has the original question been resolved?