Next / Previous / Contents / Shipman's homepage

5.6. FontSelect._familyHandler(): Callback for family changes

This method is called by the FamilyPicker widget whenever a new family is selected. Its argument is the new family name. All it does is pass that family name to the Controls.setFamily() widget.

fontselect.py
    def _familyHandler(self, newFamily):
        """Handler for change of family name.

          [ newFamily is a string ->
             self.controls  :=  self.controls with its font
                 family set to newFamily ]             
        """
        self.controls.setFamily(newFamily)