#=======================VARIABLES======================
METER = StringVar()
METER1 = StringVar()
CENTIMETER = StringVar()
CENTIMETER1 = StringVar()
CELCIUS = StringVar()
CELCIUS1 = StringVar()
FAHRENHEIT = StringVar()
FAHRENHEIT1 = StringVar()
#=======================FRAME==========================
Top = Frame(root, width=700, bd=1, relief=SOLID)
Top.pack(side=TOP)
TopTitle = Frame(root, width=700, bd=1, relief=SOLID)
TopTitle.pack(side=TOP, pady=10)
TopForm = Frame(root, width=700, bg="#ff9999")
TopForm.pack(side=TOP)
TopLeft = Frame(TopForm, width=350, bd=1, relief=SOLID)
TopLeft.pack(side=LEFT, padx=10)
TopRight = Frame(TopForm, width=350, bd=1, relief=SOLID)
TopRight.pack(side=RIGHT, padx=10)
BottomTitle = Frame(root, width=700, bd=1, relief=SOLID)
BottomTitle.pack(side=TOP, pady=10)
BottomForm = Frame(root, width=700, bg="#ff9999")
BottomForm.pack(side=TOP)
BottomLeft = Frame(BottomForm, width=250, bd=1, relief=SOLID)
BottomLeft.pack(side=LEFT)
BottomRight = Frame(BottomForm, width=250, bd=1, relief=SOLID)
BottomRight.pack(side=RIGHT, padx=10)
#=======================LABEL WIDGET===================
lbl_title = Label(Top, text="Python: Simple Temperature Conversion", width=700 ,font=('arial', 18))
lbl_title.pack(fill=X)
lbl_TopTitle = Label(TopTitle, text="Metric", width=700 ,font=('arial', 12), bg="#ccccff")
lbl_TopTitle.pack(fill=X)
lbl_BottomTitle = Label(BottomTitle, text="Temperature", width=700 ,font=('arial', 12), bg="#ccccff")
lbl_BottomTitle.pack(fill=X)
lbl1 = Label(TopLeft, text="Meter To Centimeter",font=('arial', 12))
lbl1.grid(row=0, columnspan=5, column=0)
lbl2 = Label(TopRight, text="Centimeter To Meter",font=('arial', 12))
lbl2.grid(row=0, columnspan=5, column=0)
lbl3 = Label(BottomLeft, text="Celcius To Fahrenheit",font=('arial', 12))
lbl3.grid(row=0, columnspan=5, column=0)
lbl4 = Label(BottomRight, text="Farenheit To Celcius",font=('arial', 12))
lbl4.grid(row=0, columnspan=5, column=0)
lbl_meter = Label(TopLeft, text="Meter", font=(12))
lbl_meter.grid(row=1, padx=5, pady=10)
lbl_meter1 = Label(TopRight, text="Meter", font=(12))
lbl_meter1.grid(row=1, column=3, padx=5, pady=10)
lbl_to = Label(TopLeft, text="-")
lbl_to.grid(row=1, column=2)
lbl_to1 = Label(TopRight, text="-")
lbl_to1.grid(row=1, column=2)
lbl_centimeter = Label(TopLeft, text="Centimeter", font=(12))
lbl_centimeter.grid(row=1, column=3)
lbl_centimeter1 = Label(TopRight, text="Centimeter", font=(12))
lbl_centimeter1.grid(row=1)
lbl_celcius = Label(BottomLeft, text="Celcius", font=(12))
lbl_celcius.grid(row=1, padx=5, pady=10)
lbl_celcius1 = Label(BottomRight, text="Celcius", font=(12))
lbl_celcius1.grid(row=1, column=3 )
lbl_to2 = Label(BottomLeft, text="-")
lbl_to2.grid(row=1, column=2)
lbl_to3 = Label(BottomRight, text="-")
lbl_to3.grid(row=1, column=2)
lbl_fahrenheit = Label(BottomLeft, text="Fahrenheit", font=(12))
lbl_fahrenheit.grid(row=1, column=3)
lbl_fahrenheit1 = Label(BottomRight, text="Fahrenheit", font=(12))
lbl_fahrenheit1.grid(row=1, padx=5, pady=10)
#=======================ENTRY WIDGET===================
meter1 = Entry(TopLeft, textvariable=METER, width=12)
meter1.grid(row=1, column=1)
meter2 = Entry(TopRight, textvariable=METER1, width=12, state=DISABLED)
meter2.grid(row=1, column=4, padx=5)
centimeter1 = Entry(TopLeft, textvariable=CENTIMETER, width=12, state=DISABLED)
centimeter1.grid(row=1, column=4, padx=5)
centimeter2 = Entry(TopRight, textvariable=CENTIMETER1, width=12)
centimeter2.grid(row=1, column=1)
celcius1 = Entry(BottomLeft, textvariable=CELCIUS, width=12)
celcius1.grid(row=1, column=1)
celcius2 = Entry(BottomRight, textvariable=CELCIUS1, width=12, state=DISABLED)
celcius2.grid(row=1, column=4, padx=5)
fahrenheit1 = Entry(BottomLeft, textvariable=FAHRENHEIT, width=12, state=DISABLED)
fahrenheit1.grid(row=1, column=4, padx=5)
fahrenheit2 = Entry(BottomRight, textvariable=FAHRENHEIT1, width=12)
fahrenheit2.grid(row=1, column=1)
#=======================BUTTON WIDGET==================
btn1 = Button(TopLeft, text="Convert", width=20, bg="#006dcc", command=MeterToCenti)
btn1.grid(row=2, columnspan=5, column=0, pady=10)
btn2 = Button(TopRight, text="Convert", width=20, bg="#006dcc", command=CentiToMeter)
btn2.grid(row=2, columnspan=5, column=0, pady=10)
btn3 = Button(BottomLeft, text="Convert", width=20, bg="#006dcc", command=CelciusToFahren)
btn3.grid(row=2, columnspan=5, column=0, pady=10)
btn4 = Button(BottomRight, text="Convert", width=20, bg="#006dcc", command=FahrenToCelcius)
btn4.grid(row=2, columnspan=5, column=0, pady=10)