Next / Previous / Contents / TCC Help System / NM Tech homepage

19.7. ParamSlider.__minusHandler(): Decrement the parameter

This method is called when the user clicks the “-” button to decrement the parameter.

huey
# - - -   P a r a m S l i d e r . _ _ m i n u s H a n d l e r

    def __minusHandler ( self ):
        """Increment the parameter.
        """

        #-- 1 --
        # [ if self.__scaleVar has a value > 0 ->
        #     self.__scaleVar  -=  1
        #   else -> I ]
        oldValue  =  self.__scaleVar.get()
        if  oldValue > 0:
            self.__scaleVar.set ( oldValue - 1 )
            if  self.__callback is not None:
                self.__callback()