When I change the OptionMenu It all shift's to the left , and I want everything to stay centered?
It changes it every time I change widget w2.
Code:
from Tkinter import *
root=Tk()
root.geometry("540x250+400+250")
root.title('Converter')
root.resizable(0, 0)
variable = StringVar(root)
variable.set(" Select A Measurement ") # default value
variable2 = StringVar(root)
variable2.set("Select A Second Measurement") # default value
l=Label(root,text='To')
l.grid(row=1, column=1, sticky='NW')
w = OptionMenu(root, variable, "CM", "MM", "M", "Inches")
w.grid(row=1, column=0, sticky='NE')
w2 = OptionMenu(root, variable2, "Inches", "MM", "M", "CM")
w2.grid(row=1, column=2, sticky='NW')
#spacers
w = Label(root,text=' ')
w.grid(row=3, column=1, sticky='NW')
#spacers
w = Label(root,text=' ')
w.grid(row=2, column=1, sticky='NW')
b = Button(root, text=" Convert ",font=(None,15))
b.grid(row=4, column=1, sticky='NW')
mainloop()