I'm trying to find a way to format this tkinter GUI so that I can have widgets in the same column that are different widths. I want to do this so that each label doesn't have an unnecessary amount of white space on either side and can be directly next to its entry box. I've tried shrinking the column, but that obscures the prompt. There might also be another way that I'm not aware of that would format this in a visually appealing way. I am open to any suggestions.
This is what it currently looks like.
import tkinter as tk
responses = ['running', 'reading', 'programming', 'fishing']
prompt_2 = "At what time do you want to do each activity?"
root = tk.Tk()
root.geometry("335x200")
root.title("Schedule Maker")
prompt = tk.Label(
root,
text=prompt_2
)
button = tk.Button(
root,
text="ENTER",
width=10,
height=2
)
button.grid(row=len(responses)+1, column=0)
prompt.grid(row=0, column=0)
prompt['text'] = prompt_2
label0_list = []
label1_list = []
entry0_list = []
entry1_list = []
for w in range(len(responses)):
label0 = tk.Label(root, text=responses[w] + ":")
label0.grid(row=w+1, column=0)
label0_list.append(label0)
label1 = tk.Label(root, text='to')
label1.grid(row=w+1, column=2)
label1_list.append(label1)
entry0 = tk.Entry(root, width=6)
entry0.grid(row=w+1, column=1)
entry0_list.append(entry0)
entry1 = tk.Entry(root, width=6)
entry1.grid(row=w+1, column=3)
entry1_list.append(entry1)
root.mainloop()