This is my first application on Tkinter, I am trying to take inputs from a selected file button from the dropdown menu and trigger the function which is to be executed when the submit button is clicked. This objective is achieved but designing the buttons and labels as required is failing.
root = tk.Tk()
root.geometry('1200x800')
root.title("Update System")
label_0 = Label(root, text="Update System",width=25,font=("bold", 25),height=2,bg='brown',fg='white')
label_0.place(x=170,y=30)
root.mainloop()
I receive the error TclError: unknown option "-fg" (for bg-background, height attributes of buttons and labels). Complete traceback is shown below:
---------------------------------------------------------------------------
TclError Traceback (most recent call last)
<ipython-input-15-2c166bb79a75> in <module>
3 root.title("Update System")
4
----> 5 label_0 = Label(root, text="Update System",width=25,font=("bold", 25),height=2,bg='brown',fg='white')
6 label_0.place(x=170,y=30)
7
~\Anaconda3\lib\tkinter\ttk.py in __init__(self, master, **kw)
759 relief, text, wraplength
760 """
--> 761 Widget.__init__(self, master, "ttk::label", kw)
762
763
~\Anaconda3\lib\tkinter\ttk.py in __init__(self, master, widgetname, kw)
557 # Load tile now, if needed
558 _load_tile(master)
--> 559 tkinter.Widget.__init__(self, master, widgetname, kw=kw)
560
561
~\Anaconda3\lib\tkinter\__init__.py in __init__(self, master, widgetName, cnf, kw, extra)
2297 del cnf[k]
2298 self.tk.call(
-> 2299 (widgetName, self._w) + extra + self._options(cnf))
2300 for k, v in classes:
2301 k.configure(self, v)
TclError: unknown option "-height"
It would be great if someone can help me understand and figure out this issue. Thanks in advance!