forked from Rustam-Z/python-programming
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloading_page.py
More file actions
36 lines (27 loc) Β· 874 Bytes
/
Copy pathloading_page.py
File metadata and controls
36 lines (27 loc) Β· 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import tkinter as tk
import time
from PIL import Image, ImageTk
class Splash(tk.Toplevel):
def __init__(self, parent):
tk.Toplevel.__init__(self, parent)
self.title("Xabar")
self.geometry("400x400+480+200")
tk.Label(self, text="Kuting, ma'lumotlar bazasi yuklanmoqda.").pack()
## required to make window show before the program gets to the mainloop
self.update()
class App(tk.Tk):
def __init__(self):
tk.Tk.__init__(self)
self.withdraw()
splash = Splash(self)
## setup stuff goes here
self.title("Main Window")
## simulate a delay while loading
time.sleep(6)
## finished loading so destroy splash
splash.destroy()
## show window again
self.deiconify()
if __name__ == "__main__":
app = App()
app.mainloop()