from tkinter import * from tkinter import colorchooser def click(): color = colorchooser.askcolor() #assign color to a vraible colorHex = color[1] #assigns element at index 1 to a variable window.config(bg=colorHex) #change background color window = Tk() window.geometry("420x420") button = Button(text='click me',command=click) button.pack() window.mainloop()
Hey Bro Code! I've Been Following Your Python Tkinter GUI Tutorial But, When I Try Doing The Command Option On A Button, It Gives Me This Error: _tkinter.TclError: unknown option "-commmand" Can You Help?
from tkinter import *
from tkinter import colorchooser
def click():
color = colorchooser.askcolor() #assign color to a vraible
colorHex = color[1] #assigns element at index 1 to a variable
window.config(bg=colorHex) #change background color
window = Tk()
window.geometry("420x420")
button = Button(text='click me',command=click)
button.pack()
window.mainloop()
Hey Bro Code! I've Been Following Your Python Tkinter GUI Tutorial But, When I Try Doing The Command Option On A Button, It Gives Me This Error:
_tkinter.TclError: unknown option "-commmand"
Can You Help?
@@PixelCodes Hello! You wrote coMMMand! not coMMand! :) Soo correct is button = Button(text="button", command = click)
@@lukasmacku2423 Hi! This is actually an old comment as you can see. I got help from stack overflow :)
@@PixelCodesOh, 6 months old :D
The important thing is that you found a mistake! :)
You are an amazing teacher!
Getting me back up to snuff. Thanks.
I like the bro code tutorials
Why are you so amazing?
Thank you!!
no! You're amazing!
@@BroCodez oh, thank you, we both are amazing 😉
Yo guys, I think we are on the same page
No you’re breathtaking
@@linkguy30 hehe thx, you too!
There are teachers but there are still teachers.
Bro Thanks
You are the best!!!
Nice
Wow!
You are great...
hello bro your videos is very helpfull
👍
Thank you man. You just saved my life man. I love you man
Never been able to find the code you indicate you have been posting in the comments section. Little Help.
Awesome work though. Thank you very much.
U have to appreciate his upload shedule
NOICE!
gr8
شكرا
meow meow meow~!
insanely useful, thank you!
Ty bro
thank you so much bro great video
Thank you so much bro.... ✨️
why do we not have to put window in the constructor of our button? you've done it every time before so I thought it was necessary
Hey bro, How to create fading color(gradient color like light blue to dark blue fade effect) in python GUI?
Thank you!❤
Hi bro
Hey Durlabh!
: )
thx 4 vid bro !