I want a window that contains two frames. The top frame includes five labels for user input. The bottom frame includes two buttons. I got this result:
It is obvious that the button location is wrong. It seems to me that the button's grid does not work.
Here is my code:
frame1 = Frame(master).grid(row=0, sticky="ew")
frame2 = Frame(master).grid(row=1, sticky="ew")
Label(frame1, text="game name").grid(row=0, column=0)
Label(frame1, text="env").grid(row=1, column=0)
Label(frame1, text="event_source").grid(row=2, column=0)
Label(frame1, text="event_name").grid(row=3, column=0)
Label(frame1, text="game_id").grid(row=4, column=0)
e1 = Entry(frame1).grid(row=0, column=1)
e2 = Entry(frame1).grid(row=1, column=1)
e3 = Entry(frame1).grid(row=2, column=1)
e4 = Entry(frame1).grid(row=3, column=1)
e5 = Entry(frame1).grid(row=4, column=1)
Button(frame2, text='Quit', command=master.destroy).grid(row=0, column=0)
Button(frame2, text='Save', command=lambda: self.show_entry_fields(e1, e2, e3, e4, e5)).grid(row=0, column=3)