commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r8642 - trunk/gnue-forms/src/uidrivers/wx26/widgets


From: johannes
Subject: [gnue] r8642 - trunk/gnue-forms/src/uidrivers/wx26/widgets
Date: Tue, 29 Aug 2006 09:45:54 -0500 (CDT)

Author: johannes
Date: 2006-08-29 09:45:53 -0500 (Tue, 29 Aug 2006)
New Revision: 8642

Modified:
   trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py
Log:
Block wheel-event for dropdowns on msw


Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py        2006-08-29 
14:43:41 UTC (rev 8641)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py        2006-08-29 
14:45:53 UTC (rev 8642)
@@ -173,6 +173,7 @@
         # On MSW we don't get all keys in wx.EVT_CHAR, so we have to bind keyup
         if 'wxMSW' in wx.PlatformInfo:
             item.Bind(wx.EVT_KEY_DOWN, self.__on_msw_keydown)
+            item.Bind(wx.EVT_MOUSE_WHEEL, self.__on_cbx_wheel)
 
         # The button release event is fired on wxGTK only
         elif 'wxGTK' in wx.PlatformInfo:
@@ -379,7 +380,14 @@
         else:
             event.Skip()
         
+    # -------------------------------------------------------------------------
 
+    def __on_cbx_wheel(self, event):
+
+        # On wx.MSW we stop the propagation of a mouse wheel event here, to
+        # prevent it from changing options in dropdowns
+        event.StopPropagation()
+
     # -------------------------------------------------------------------------
     # Do the dirty work for moving the focus and adjusting the row
     # -------------------------------------------------------------------------





reply via email to

[Prev in Thread] Current Thread [Next in Thread]