How to make a simple button in customtkinter

PHOTO EMBED

Tue Jul 25 2023 12:35:30 GMT+0000 (Coordinated Universal Time)

Saved by @pythonHub #python #python-hub #ctk #oop

from customtkinter import *

app = CTk()

button = CTkButton(app)
button.pack(padx = 10, pady = 10)

app.mainloop()

# In OOP
class App(CTk):
    def __init__(self):
        super().__init__()

        self.button = CTkButton(self)
        self.button.pack(padx = 10, pady = 10)

        
if __name__ == "__main__":
    app = App()
    app.mainloop()
content_copyCOPY