You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I'm trying to change the command of aCTkButton using the configure method, but I'm getting an exception.
Here is the exception:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 1892, in __call__
return self.func(*args)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\customtkinter\customtkinter_button.py", line 505, in clicked
self.function()
File "c:\Users\User\Desktop\youtube-audio-downloader\tempCodeRunnerFile.py", line 8, in print_hello
btn.configure(command=print_bye)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\customtkinter\customtkinter_button.py", line 443, in configure
super().configure(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 1646, in configure
return self._configure('configure', cnf, kw)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 1636, in _configure
self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
_tkinter.TclError: unknown option "-command"
This functionality simply wasn't implemented yet for the Button, but now I added it and you can change the command with .configure(). It isn't on pip for now but you can also download the customtkinter folder from Github and place it next to your file.
So I'm trying to change the command of aCTkButton using the configure method, but I'm getting an exception.
Here is the exception:
And here is my code:
The text was updated successfully, but these errors were encountered: