Sets a callback for this widget against a ref (reference) for a
        tk_event, setting the callback to None will remove it.

def set_event(self, ref, tk_event, callback):
        """
        Sets a callback for this widget against a ref (reference) for a
        tk_event, setting the callback to None will remove it.
        """
        # has an EventCallback been created for this tk event
        if tk_event not in self._event_callbacks:
            self._event_callbacks[tk_event] = EventCallback(self._widget, self._tks, tk_event)

        # assign this ref to this event callback
        self._refs[ref] = self._event_callbacks[tk_event]

        # set up the callback
        self._refs[ref].set_callback(ref, callback)