Aug-07-2019, 07:15 PM
i try like this something short:
def confirm(self): s[:] = [1 if v.get() else 0 for v in self.checkvars] self.chk1.config(state=DISABLED if s[5] == 1 else NORMAL ) self.chk2.config(state=DISABLED if s[6] == 1 else NORMAL) self.chk3.config(state=DISABLED if s[7] == 1 else NORMAL ) self.chk4.config(state=DISABLED if s[8] == 1 else NORMAL) self.chk5.config(state=DISABLED if s[9] == 1 else NORMAL ) self.chk11.config(state=DISABLED if s[0] == 1 else NORMAL) self.chk12.config(state=DISABLED if s[1] == 1 else NORMAL) self.chk13.config(state=DISABLED if s[2] == 1 else NORMAL) self.chk14.config(state=DISABLED if s[3] == 1 else NORMAL) self.chk15.config(state=DISABLED if s[4] == 1 else NORMAL)any suggestion?