I am writing a GUI with the screen of Raspberry.Each time I destroy a GUI and call a new GUI there will be a delay of about a few seconds to make the user see the raspberry's desktop. I want to draw a loading interface down to the background so that when I switch the screen the user won't see the raspberry desktop. I use this code:
from tkinter import *
class Load_Screen:
def __init__(self, master):
self.master = master
self.master.configure(background='white')
self.frame = Frame(self.master)
self.frame.pack()
self.canvas = Canvas(self.frame, width = 350, height = 250)
self.canvas.configure(background='white')
self.canvas.pack()
self.img = PhotoImage(file="image/loading.png")
self.canvas.create_image(55,150, anchor=W, image=self.img)
newWindow = Toplevel(self.master)
newWindow.geometry("700x500")
app = Main_Screen(newWindow)
class Main_Screen:
def __init__(self, master):
self.master = master
self.frame = Frame(self.master)
self.frame.pack()
def main():
root = Tk()
root.geometry("760x600")
app = Load_Screen(root)
root.mainloop()
if __name__ == '__main__':
main()
However, the loading screen overrides the main screen. And I want the opposite, the bottom loading screen and the main screen above