def disable ( self ) : if not self . _expert : self . config ( state = 'disable' ) self . _active = False
how to make toggle button in python
Disable the button if in non - expert mode ; unset its activity flag come - what - may .
def disable(self):
        """
        Disable the button, if in non-expert mode;
        unset its activity flag come-what-may.
        """
        if not self._expert:
            self.config(state='disable')
        self._active = False