Next / Previous / Contents / Shipman's homepage

17.5. ModelSelector.__radioHandler(): Handler for radiobutton action

This method is called when the user selects one of the color model radiobuttons.

# - - -   M o d e l S e l e c t o r . _ _ r a d i o H a n d l e r

    def __radioHandler ( self ):
        """The user selected a different color model.

When the model is changed, we must call our callback function to notify outside observers of the new model. The argument to the callback is a ColorModel instance.

        #-- 1 --
        if  self.__callback is not None:
            modelx  =  self.__radioVar.get()
            self.__callback ( self.__modelList[modelx] )