I am quite new to python programming and having trouble with this program. This is what my GUI looks like Click Here . What I am trying to acomplish is by have the two comboboxes select the units and then calculate them.
Code:
self.measurements = StringVar()
self.Combobox_Length_Left = ttk.Combobox(self.length_frame, textvariable = self.measurements, values = ('mm', 'cm', 'inches', 'feet', 'yards', 'meter', 'km', 'miles'), width = 10)
self.Combobox_Length_Left.grid(row = 2, column = 0, padx = 5, pady = 5, sticky = E)
self.measurements1 = StringVar()
self.Combobox_Length_Right = ttk.Combobox(self.length_frame, textvariable = self.measurements1, value = ('mm', 'cm', 'inches', 'feet', 'yards', 'meter', 'km', 'miles'), width = 10)
self.Combobox_Length_Right.grid(row = 2, column = 2, padx = 5, pady = 5, sticky = E)
#Labels
self.Convertion = Label(self.length_frame, text = 'Convertion:')
self.Convertion.grid(row = 1, column = 0, padx = 5, pady = 5, sticky = W)
self.Label_Blank = Label(self.length_frame, text = '')
self.Label_Blank.grid(row = 1, column = 1, padx = 5, pady = 5, sticky = E)
self.Label_To2 = Label(self.length_frame, text = 'to')
self.Label_To2.grid(row = 2, column = 1, padx = 5, pady = 5, sticky = E)
self.Label_To = Label(self.length_frame, text = 'to')
self.Label_To.grid(row = 3, column = 1, padx = 5, pady = 5, sticky = E)
#Entry Boxes
self.Text_Length_Left = StringVar()
self.Entry_Length_Left = ttk.Entry(self.length_frame, textvariable = self.Text_Length_Left,width = 13)
self.Entry_Length_Left.grid(row = 3, column = 0, padx = 5, pady = 5)
self.Text_Length_Right = StringVar()
self.Entry_Length_Right = ttk.Entry(self.length_frame, textvariable = self.Text_Length_Right,width = 13)
self.Entry_Length_Right.grid(row = 3, column = 2, padx = 5, pady = 5)
I just need someone to help me with the calculations/ programming
Thanks!