def set_event(self, ref, tk_event, callback):
<EOL>if tk_event not in self._event_callbacks:<EOL><INDENT>self._event_callbacks[tk_event] = EventCallback(self._widget, self._tks, tk_event)<EOL><DEDENT>self._refs[ref] = self._event_callbacks[tk_event]<EOL>self._refs[ref].set_callback(ref, callback)<EOL>
Sets a callback for this widget against a ref (reference) for a
tk_event, setting the callback to None will remove it.