-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
38 lines (29 loc) · 1.13 KB
/
Copy pathexample.py
File metadata and controls
38 lines (29 loc) · 1.13 KB
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
37
38
import customtkinter
from CTkLoadingPopup import CTkLoadingPopup, CTkOverlayedLoadingPopup
app = customtkinter.CTk()
app.title("CTkLoadingPopup example")
app.geometry("400x300")
def show_loading_popup():
global popup
popup = CTkLoadingPopup(app)
def close_loading_popup():
if popup is not None:
popup.close()
popup = None
show_button = customtkinter.CTkButton(app, text="Show CTkLoadingPopup",
command=show_loading_popup)
show_button.pack(padx=10, pady=10)
close_button = customtkinter.CTkButton(app, text="Close CTkLoadingPopup",
command=close_loading_popup)
close_button.pack(padx=10, pady=10)
show_with_cancel_button = customtkinter.CTkButton(
app, text="Show CTkLoadingPopup with 'Cancel' button",
command=lambda: CTkLoadingPopup(app, cancel_button=True)
)
show_with_cancel_button.pack(padx=10, pady=10)
show_overlayed_button = customtkinter.CTkButton(
app, text="Show CTkOverlayedLoadingPopup",
command=lambda: CTkOverlayedLoadingPopup(app, cancel_button=True)
)
show_overlayed_button.pack(padx=10, pady=10)
app.mainloop()