code: def state(self, statespec=None):
          
          if statespec:
              if "disabled" in statespec:
                  self.bind('<Button-1>', lambda e: 'break')
              elif "!disabled" in statespec:
                  self.unbind("<Button-1>")
                  self.bind("<Button-1>", self._box_click, True)
              return ttk.Treeview.state(self, statespec)
          else:
              return ttk.Treeview.state(self)
docs: Modify or inquire widget state.
          
          :param statespec: Widget state is returned if `statespec` is None, 
                            otherwise it is set according to the statespec 
                            flags and then a new state spec is returned 
                            indicating which flags were changed.
          :type statespec: None or sequence[str]