I have the a Tkinter App, but I'd like to change the background color to Blue of the first column
from tkinter import *
from tkinter import ttk
root = Tk()
mainframe = ttk.Frame(root, padding="3 3 500 200")
mainframe.grid(column=0, row=0)
ttk.Label(mainframe, text="COLUMN 1 ROW 1").grid(column=1, row=1)
root.mainloop()
I've tried the following, but I receive an error:
from tkinter import *
from tkinter import ttk
root = Tk()
mainframe = ttk.Frame(root, padding="3 3 500 200")
mainframe.grid(column=0, row=0)
ttk.Label(mainframe, text="COLUMN 1 ROW 1").grid(column=1, row=1,bg ="blue4")
root.mainloop()
tkinter.TclError:
Traceback (most recent call last):
File "/Users/chriscruz/Desktop/aesop_1.1.py", line 11, in <module>
ttk.Label(mainframe, text="COLUMN 1 ROW 1").grid(column=1, row=1,bg ="blue4")
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 2029, in grid_configure
+ self._options(cnf, kw))
_tkinter.TclError: bad option "-bg": must be -column, -columnspan, -in, -ipadx, -ipady, -padx, -pady, -row, -rowspan, or -sticky
