예제 #1
0
import customtkinter

app = customtkinter.CTk()
app.geometry("400x240")


def button_function():

    top = customtkinter.CTkToplevel(app)

    app.after(1000, top.iconify)  # hide toplevel
    app.after(1500, top.deiconify)  # show toplevel
    app.after(2500, app.iconify)  # hide app
    app.after(3000, app.deiconify)  # show app
    app.after(4000, app.destroy)  # destroy everything


button = customtkinter.CTkButton(app, command=button_function)
button.pack(pady=20, padx=20)

app.mainloop()
import tkinter
import customtkinter  # <- import the CustomTkinter module

customtkinter.ScalingTracker.set_window_scaling(0.5)

customtkinter.set_appearance_mode(
    "dark")  # Modes: "System" (standard), "Dark", "Light"
customtkinter.set_default_color_theme(
    "blue")  # Themes: "blue" (standard), "green", "dark-blue"

app = customtkinter.CTk(
)  # create CTk window like you do with the Tk window (you can also use normal tkinter.Tk window)
app.geometry("400x480")
app.title("CustomTkinter manual scaling test")

top_tk = customtkinter.CTkToplevel(app)
top_tk.geometry("500x500")

#app.minsize(200, 200)
#app.maxsize(520, 520)
#app.resizable(True, False)


def button_function():
    app.geometry(f"{200}x{200}")
    print("Button click", label_1.text_label.cget("text"))


def slider_function(value):
    customtkinter.set_widget_scaling(value * 2)
    customtkinter.set_spacing_scaling(value * 2)
예제 #3
0
 def __init__(self):
     self.root_ctk = customtkinter.CTk()
     self.root_ctk.title("TestCTk")
 def __init__(self):
     self.root_ctk = customtkinter.CTk()
     self.ctk_button = customtkinter.CTkButton(self.root_ctk)
     self.ctk_button.pack(padx=20, pady=20)
     self.root_ctk.title(self.__class__.__name__)
예제 #5
0
 def __init__(self):
     self.root_ctk = customtkinter.CTk()
     self.root_ctk.title("TestCTkToplevel")
     self.ctk_toplevel = customtkinter.CTkToplevel()
     self.ctk_toplevel.title("TestCTkToplevel")