I feel like I am missing something stupidly obvious here - surely the widgets should just be positioned along the top of the root window, but they completely ignore the .grid()
function.
When I printed the grid_size()
, it returned (0,0)
. Why?!
Any help greatly appreciated :)
title = tk.Label(root, text="Enter a city below")
title.grid(row=0, column=0)
title.pack()
e = tk.Entry(root)
e.grid(row = 0, column = 1)
e.pack()
current_clicker = ttk.Button(root, text = "Current forecast", command=current)
current_clicker.grid(row=0, column=2)
current_clicker.pack()
hourly_clicker = ttk.Button(root, text = "By hour", command=hourly)
hourly_clicker.grid(row=0, column=3)
hourly_clicker.pack()
minute_clicker = ttk.Button(root, text = "By minute", command=minute)
minute_clicker.grid(row=0, column=4)
minute_clicker.pack()
daily_clicker = ttk.Button(root, text = "Daily", command=daily)
daily_clicker.grid(row=0, column=5)
print(daily_clicker.grid_size())
daily_clicker.pack()