2022-02-21 17:35:08 +03:00
|
|
|
import customtkinter
|
|
|
|
|
|
|
|
|
|
|
|
class ExampleApp(customtkinter.CTk):
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
|
|
super().__init__(*args, **kwargs)
|
|
|
|
|
2022-03-05 15:05:39 +03:00
|
|
|
self.geometry("500x400")
|
|
|
|
|
|
|
|
self.button_1 = customtkinter.CTkButton(self, text="Create CTkToplevel", command=self.create_toplevel)
|
|
|
|
self.button_1.pack(side="top", padx=40, pady=40)
|
|
|
|
|
|
|
|
def create_toplevel(self):
|
2022-02-21 17:35:08 +03:00
|
|
|
window = customtkinter.CTkToplevel(self)
|
|
|
|
window.geometry("400x200")
|
|
|
|
|
2022-03-05 15:05:39 +03:00
|
|
|
label = customtkinter.CTkLabel(window, text="CTkToplevel window")
|
2022-02-21 17:35:08 +03:00
|
|
|
label.pack(side="top", fill="both", expand=True, padx=40, pady=40)
|
|
|
|
|
|
|
|
|
2022-03-05 15:05:39 +03:00
|
|
|
app = ExampleApp()
|
2022-05-22 18:11:15 +03:00
|
|
|
app.mainloop()
|