mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
added CTk zoom behavior test
This commit is contained in:
parent
81f3f9a622
commit
dcde8d69d8
@ -7,9 +7,6 @@ customtkinter.set_appearance_mode("dark")
|
|||||||
app = customtkinter.CTk()
|
app = customtkinter.CTk()
|
||||||
app.geometry("400x240")
|
app.geometry("400x240")
|
||||||
|
|
||||||
app.withdraw()
|
|
||||||
app.after(2000, app.deiconify)
|
|
||||||
|
|
||||||
|
|
||||||
def change_appearance_mode():
|
def change_appearance_mode():
|
||||||
# test appearance mode change while withdrawn
|
# test appearance mode change while withdrawn
|
@ -0,0 +1,27 @@
|
|||||||
|
import customtkinter
|
||||||
|
|
||||||
|
customtkinter.set_appearance_mode("dark")
|
||||||
|
|
||||||
|
|
||||||
|
app = customtkinter.CTk()
|
||||||
|
app.geometry("400x240")
|
||||||
|
|
||||||
|
|
||||||
|
def change_appearance_mode():
|
||||||
|
# test zoom with withdraw
|
||||||
|
app.after(1000, lambda: app.state("zoomed"))
|
||||||
|
app.after(2000, app.withdraw)
|
||||||
|
app.after(3000, app.deiconify)
|
||||||
|
app.after(4000, lambda: app.state("normal"))
|
||||||
|
|
||||||
|
# test zoom with iconify
|
||||||
|
app.after(5000, lambda: app.state("zoomed"))
|
||||||
|
app.after(6000, app.iconify)
|
||||||
|
app.after(7000, app.deiconify)
|
||||||
|
app.after(8000, lambda: app.state("normal"))
|
||||||
|
|
||||||
|
|
||||||
|
button_1 = customtkinter.CTkButton(app, text="start test", command=change_appearance_mode)
|
||||||
|
button_1.pack(pady=20, padx=20)
|
||||||
|
|
||||||
|
app.mainloop()
|
Loading…
Reference in New Issue
Block a user