tkinter – Background color for Tk in Python

tkinter – Background color for Tk in Python

root.configure(background=black)

or more generally

<widget>.configure(background=black)

I know this is kinda an old question but:

root[bg] = black

will also do what you want and it involves less typing.

tkinter – Background color for Tk in Python

Its been updated so

root.configure(background=red)

is now:

root.configure(bg=red)

Leave a Reply

Your email address will not be published. Required fields are marked *