'Setting background color or bg for a button in Python Tkinter not working
I'm new to tkinter and I can't set the background color of a button
My code:
from tkinter import *
from tkinter import ttk
root = Tk()
frame = Frame(root).grid(row = 0, column = 0)
button = ttk.Button(frame, text = "CLICK ME", bg = '#05752a').grid(row = 0, column = 0)
root.mainloop()
ERROR:
_tkinter.TclError: unknown option "-bg"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
