I am currently using a lot of code for this. Is there a way to summarise the code? Thanks a lot!
I would like to summarise the If conditions.
'''
if self.calculations["A1"].get() == 0 and event_measure == "A1":
self.Menu_blade_exchange["A1"].grid(row =2, column = 1, padx=3, pady=1, sticky = "W")
self.Menu_rubbing_marks["A1"].grid(row =2, column = 2, padx=3, pady=1, sticky = "W")
if self.calculations["A1"].get() == 1 and event_measure == "A1":
self.Menu_blade_exchange["A1"].grid_forget()
self.Menu_rubbing_marks["A1"].grid_forget()
self.Menu_rubbing_marks_border["A1"].grid_forget()
self.blade_exchange_Type["A1"].set('')
self.rubbing_marks_Type["A1"].set('')
self.rubbing_marks_border_Type["A1"].set('')
if self.calculations["A2"].get() == 0 and event_measure == "A2":
self.Menu_blade_exchange["A2"].grid(row =3, column = 1, padx=3, pady=1, sticky = "W")
self.Menu_rubbing_marks["A2"].grid(row =3, column = 2, padx=3, pady=1, sticky = "W")
if self.calculations["A2"].get() == 1 and event_measure == "A2":
self.Menu_blade_exchange["A2"].grid_forget()
self.Menu_rubbing_marks["A2"].grid_forget()
self.Menu_rubbing_marks_border["A2"].grid_forget()
self.blade_exchange_Type["A2"].set('')
self.rubbing_marks_Type["A2"].set('')
self.rubbing_marks_border_Type["A2"].set('')
.... '''