Next / Previous / Contents / Shipman's homepage

5.7. 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)