def set(self, alpha):
        """
        Set cursor position on the color corresponding to the alpha value.

        :param alpha: new alpha value (between 0 and 255)
        :type alpha: int
        """
        if alpha > 255:
            alpha = 255
        elif alpha < 0:
            alpha = 0
        x = alpha / 255. * self.winfo_width()
        self.coords('cursor', x, 0, x, self.winfo_height())
        self._variable.set(alpha)
Set cursor position on the color corresponding to the alpha value.

        :param alpha: new alpha value (between 0 and 255)
        :type alpha: int