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

5.5. FontSelect.__controlHandler(): Callback for any font change

This method is called by the Controls widget whenever any font option is changed. Its purpose is to notify the user's observer callback.

fontselect.py
    def __controlHandler ( self, newFont ):
        """Handler for a changed font.

          [ newFont is a tkFont.Font object ->
              call each function in self.__observerList, passing
              newFont to each one ]
        """
        for  observer in self.__observerList:
            observer ( newFont )