def enable(self): if not self.disabled: return BinillaWidget.set_disabled(self, False) self.config(bg=self.default_bg_color) self.sel_label.config(bg=self.enum_normal_color, fg=self.text_normal_color) self.arrow_button.config(state='normal')
def disable(self): if self.disabled: return BinillaWidget.set_disabled(self, True) self.config(bg=self.enum_disabled_color) self.sel_label.config(bg=self.enum_disabled_color, fg=self.text_disabled_color) self.arrow_button.config(state='disabled')
def set_disabled(self, disable=True): if bool(disable) != self.disabled: self.config(state='disabled' if disable else 'normal') BinillaWidget.set_disabled(self, disable)