'Updates the position of the rectangle inside the canvas when the size of
the widget gets changed.'

def _update_coords(self, event):

    self._canv.update_idletasks()
    self._maximum = self._canv.winfo_width()
    self._startx = 0
    self._barwidth = (self._maximum / self._bardiv)
    if (self._barwidth < 2):
        self._barwidth = 2
    stopx = (self._startx + self._barwidth)
    if (stopx > self._maximum):
        stopx = self._maximum
    self._canv.coords(self._rect, 0, 0, stopx, self._canv.winfo_height())
    self._canv.update_idletasks()
