code: def _scroll_contents(self, adj):
          
          if self._adjusting:
              return True
  
          try:
              pos_x = self.hsb.get_value()
              pos_y = self.vsb.get_value()
  
              pct_x = pos_x / self.rng_x
              # invert Y pct because of orientation of scrollbar
              pct_y = 1.0 - (pos_y / self.rng_y)
  
              bd = self.viewer.get_bindings()
              bd.pan_by_pct(self.viewer, pct_x, pct_y, pad=self.pad)
  
              # This shouldn't be necessary, but seems to be
              self.viewer.redraw(whence=0)
  
          finally:
              self._scrolling = False
  
          return True
docs: Called when the scroll bars are adjusted by the user.