code: def _box_click(self, event):
          
          x, y, widget = event.x, event.y, event.widget
          elem = widget.identify("element", x, y)
          if "image" in elem:
              # a box was clicked
              item = self.identify_row(y)
              if self.tag_has("unchecked", item) or self.tag_has("tristate", item):
                  self._check_ancestor(item)
                  self._check_descendant(item)
              else:
                  self._uncheck_descendant(item)
                  self._uncheck_ancestor(item)
docs: Check or uncheck box when clicked.