(self, event=None)
return "break"
Toggle colorizing on and off.

        When toggling off, if colorizing is scheduled or is in
        process, it will be cancelled and/or stopped.

        When toggling on, colorizing will be scheduled.
Toggle colorizing on and off.
Toggle colorizing on and off .
def toggle_colorize_event(self, event=None):
        """Toggle colorizing on and off.

        When toggling off, if colorizing is scheduled or is in
        process, it will be cancelled and/or stopped.

        When toggling on, colorizing will be scheduled.
        """
        if self.after_id:
            after_id = self.after_id
            self.after_id = None
            if DEBUG: print("cancel scheduled recolorizer")
            self.after_cancel(after_id)
        if self.allow_colorizing and self.colorizing:
            if DEBUG: print("stop colorizing")
            self.stop_colorizing = True
        self.allow_colorizing = not self.allow_colorizing
        if self.allow_colorizing and not self.colorizing:
            self.after_id = self.after(1, self.recolorize)
        if DEBUG:
            print("auto colorizing turned",
                  "on" if self.allow_colorizing else "off")
        return "break"
def toggle_colorize_event ( self , event = None ) : if self . after_id : after_id = self . after_id self . after_id = None if DEBUG : print ( "cancel scheduled recolorizer" ) self . after_cancel ( after_id ) if self . allow_colorizing and self . colorizing : if DEBUG : print ( "stop colorizing" ) self . stop_colorizing = True self . allow_colorizing = not self . allow_colorizing if self . allow_colorizing and not self . colorizing : self . after_id = self . after ( 1 , self . recolorize ) if DEBUG : print ( "auto colorizing turned" , "on" if self . allow_colorizing else "off" ) return "break"