I want to make background with color in my GUI with 2 tabs, and i run into this problem, maybe some advice?
here is the code:
colors = ["Blue", "Gold", "Red"]
def radCall():
radSel=radVar.get()
if radSel == 0: tab1.configure(bg=colors[0])
elif radSel == 1: tab1.configure(bg=colors[1])
elif radSel == 2: tab1.configure(bg=colors[2])
radVar = tk.IntVar()
radVar.set(99)
for col in range(3):
curRad = tk.Radiobutton(mighty, text=colors[col], variable=radVar,
value=col, command=radCall)
curRad.grid(column=col, row=13, sticky=tk.W)
and here is the problem:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 1892, in __call__ >C:/Users/HP/
return self.func(*args) top/Kuliah/Se
File "c:\Users\HP\Desktop\Kuliah\Semester 2\Information TechnologI_jualbeli_Day\Python\week5\Informasi Jual Beli\GUI_jualbeli_Dazan.py", line 277, in radCall
if radSel == 0: tab1.configure(bg=colors[0])
File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 1646, in configure
return self._configure('configure', cnf, kw)
File "C:\Users\HP\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 "-bg"
any idea?