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

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