(self, delegate)
Set the delegate for this instance.

        A delegate is an instance of a Delegator class and each
        delegate points to the next delegator in the stack.  This
        allows multiple delegators to be chained together for a
        widget.  The bottom delegate for a colorizer is a Text
        widget.

        If there is a delegate, also start the colorizing process.
Set the delegate for this instance.
Set the delegate for this instance .
def setdelegate(self, delegate):
        """Set the delegate for this instance.

        A delegate is an instance of a Delegator class and each
        delegate points to the next delegator in the stack.  This
        allows multiple delegators to be chained together for a
        widget.  The bottom delegate for a colorizer is a Text
        widget.

        If there is a delegate, also start the colorizing process.
        """
        if self.delegate is not None:
            self.unbind("<<toggle-auto-coloring>>")
        Delegator.setdelegate(self, delegate)
        if delegate is not None:
            self.config_colors()
            self.bind("<<toggle-auto-coloring>>", self.toggle_colorize_event)
            self.notify_range("1.0", "end")
        else:
            # No delegate - stop any colorizing.
            self.stop_colorizing = True
            self.allow_colorizing = False
def setdelegate ( self , delegate ) : if self . delegate is not None : self . unbind ( "<<toggle-auto-coloring>>" ) Delegator . setdelegate ( self , delegate ) if delegate is not None : self . config_colors ( ) self . bind ( "<<toggle-auto-coloring>>" , self . toggle_colorize_event ) self . notify_range ( "1.0" , "end" ) else : # No delegate - stop any colorizing. self . stop_colorizing = True self . allow_colorizing = False