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

19.6. ParamSlider.__plusHandler(): Increment the parameter

This method is called when the user clicks the “+” button to increment the parameter.

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

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

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