'Cancel scheduling of function identified with ID.
Identifier returned by after or after_idle must be
given as first parameter.'

def after_cancel(self, id):

    try:
        data = self.tk.call('after', 'info', id)
        script = self.tk.splitlist(data)[0]
        self.deletecommand(script)
    except TclError:
        pass
    self.tk.call('after', 'cancel', id)
