code: def _drag_row(self, event):
          
          y = self._dy + event.y  # get dragged row new upper y coordinate
          self._visual_drag.place_configure(y=y)  # update row preview position
  
          if y > self._dragged_row_y:
              # moving downward
              item = self.identify_row(y + self._dragged_row_height)
              if item != '':
                  bbox = self.bbox(item)
                  if not bbox:
                      # the item is not visible so make it visible
                      self.see(item)
                      self.update_idletasks()
                      bbox = self.bbox(item)
                  if y > self._dragged_row_y + bbox[3] / 2:
                      # the row is beyond half of item, so insert it below
                      self._move_dragged_row(item)
                  elif item != self.next(self._dragged_row):
                      # item is not the lower neighbor of the dragged row so insert the row above
                      self._move_dragged_row(self.prev(item))
          elif y < self._dragged_row_y:
              # moving upward
              item = self.identify_row(y)
              if item != '':
                  bbox = self.bbox(item)
                  if not bbox:
                      # the item is not visible so make it visible
                      self.see(item)
                      self.update_idletasks()
                      bbox = self.bbox(item)
                  if y < self._dragged_row_y - bbox[3] / 2:
                      # the row is beyond half of item, so insert it above
                      self._move_dragged_row(item)
                  elif item != self.prev(self._dragged_row):
                      # item is not the upper neighbor of the dragged row so insert the row below
                      self._move_dragged_row(self.next(item))
          self.selection_remove(self._dragged_row)
docs: Continue dragging a row