code: def _set_pos(self, pos):
          
          if self._canvas.height < self._max_height:
              pos *= self._max_height - self._canvas.height + 1
              pos = int(round(max(0, pos), 0))
              self._canvas.scroll_to(pos)
docs: Set current position for scroll bar.