I'm working on a Tkinter project that has several toplevel windows and I'm having a problem placing the buttons on the windows where I want them to be. For now I'm working on getting the templates the way I want them and once that's done I plan on going back and adding code for MySQL to store the info. Anyway, here's an example of a simple root window with 2 buttons:
Running this will have the 'Save' button mid-left of the window and 'Exit' centered-bottom. If I move them around to 'RIGHT','TOP',e tc..they still won't be where I want them which is side by side, centered-bottom. How can I correct this? Thanks
Code:
from Tkinter import *
root = Tk()
root.geometry('500x500')
message = 'Button test'
Label(root, text=message).pack()
Button(root, text='Save',command=None).pack(side=LEFT)
Button(root, text='Exit',command=root.destroy).pack(side=BOTTOM)
root.mainloop()
Comment