The .grid
method returns None
. So, fr_header
is actually being assigned the value None
. When you pass that to your label Tkinter
sees the None
and assumes you want to make the master widget the root widget (Tk()
).
I never create a widget and grid
at the same time as then you lose your easy handle on the widget you just created. Do it this way instead:
fr_header=ttk.Frame(root,width=100,height=100,relief=GROOVE)
fr_header.grid(row=0,column=0)