X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d14a1e28567de23c586bc80017073d0c39f8d18f..c9463abb23ef84e060b2ad05a8da0e1d0ed9d8ff:/wxPython/src/_event_ex.py?ds=sidebyside diff --git a/wxPython/src/_event_ex.py b/wxPython/src/_event_ex.py index 70c658a939..622bed6de9 100644 --- a/wxPython/src/_event_ex.py +++ b/wxPython/src/_event_ex.py @@ -23,6 +23,14 @@ class PyEventBinder(object): for et in self.evtType: target.Connect(id1, id2, et, function) + + def Unbind(self, target, id1, id2): + """Remove an event binding.""" + success = 0 + for et in self.evtType: + success += target.Disconnect(id1, id2, et) + return success != 0 + def __call__(self, *args): """