From d576c660f7b6679d74ffef8a6f3d46b901bd37ee Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 12 Jan 2007 18:38:15 +0000 Subject: [PATCH] Added typeId property git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44209 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/docs/CHANGES.txt | 20 ++++++++++++++++++++ wxPython/src/_event_ex.py | 9 +++++++++ 2 files changed, 29 insertions(+) diff --git a/wxPython/docs/CHANGES.txt b/wxPython/docs/CHANGES.txt index 55a6a0937c..f52205717c 100644 --- a/wxPython/docs/CHANGES.txt +++ b/wxPython/docs/CHANGES.txt @@ -1,6 +1,26 @@ Recent Changes for wxPython ===================================================================== +2.8.1.1 +------- +* + +wxMSW: Fix lack of spin control update event when control lost focus + +Added a typeId property to the PyEventBinder class that holds the +eventType ID used for that event. So when you need the eventType +(such as when sending your own instance of standard events) you can +use, for example, wx.EVT_BUTTON.typeId instead of +wx.wxEVT_COMMAND_BUTTON_CLICKED. Note that there are a few composite +events, such as EVT_MOUSE and EVT_SCROLL, that will actually bind +multiple event types at once, and in these cases the typeId property +may not give you what you want. You should use te component events in +these cases. + + + + + 2.8.1.0 ------- * 8-Jan-2006 diff --git a/wxPython/src/_event_ex.py b/wxPython/src/_event_ex.py index 622bed6de9..0fcb07496a 100644 --- a/wxPython/src/_event_ex.py +++ b/wxPython/src/_event_ex.py @@ -31,6 +31,15 @@ class PyEventBinder(object): success += target.Disconnect(id1, id2, et) return success != 0 + def _getEvtType(self): + """ + Make it easy to get to the default wxEventType typeID for this + event binder. + """ + return self.evtType[0] + + typeId = property(_getEvtType) + def __call__(self, *args): """ -- 2.47.2