commit-gnue
[Top][All Lists]
Advanced

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

[gnue] r8592 - branches/forms-0.5/src/uidrivers/wx26/widgets


From: johannes
Subject: [gnue] r8592 - branches/forms-0.5/src/uidrivers/wx26/widgets
Date: Tue, 22 Aug 2006 08:03:03 -0500 (CDT)

Author: johannes
Date: 2006-08-22 08:03:01 -0500 (Tue, 22 Aug 2006)
New Revision: 8592

Modified:
   branches/forms-0.5/src/uidrivers/wx26/widgets/entry.py
Log:
Proper handling of the tab-keys on MSW's dropdowns (it's handled via
menue here)


Modified: branches/forms-0.5/src/uidrivers/wx26/widgets/entry.py
===================================================================
--- branches/forms-0.5/src/uidrivers/wx26/widgets/entry.py      2006-08-22 
12:59:08 UTC (rev 8591)
+++ branches/forms-0.5/src/uidrivers/wx26/widgets/entry.py      2006-08-22 
13:03:01 UTC (rev 8592)
@@ -142,7 +142,7 @@
     """
 
     result = wx.ComboBox (parent, -1, "", self.__pos, self.__size, [],
-        wx.CB_DROPDOWN)
+        wx.CB_DROPDOWN | wx.TE_PROCESS_TAB | wx.TE_PROCESS_ENTER)
 
     self._updateChoices (result)
 
@@ -166,11 +166,6 @@
     if not 'wxMac' in wx.PlatformInfo:
       item.Bind (wx.EVT_LEFT_UP, self.__leftMouseUp)
 
-    # On MWS a ComboBox widget does not get an EVT_CHAR event for the left- and
-    # right-keys. That's why we need to add a EVT_KEY_DOWN-handler here
-    if 'wxMSW' in wx.PlatformInfo:
-      result.Bind (wx.EVT_KEY_DOWN, self.__mswKeyDown)
-
     return result
 
 
@@ -362,28 +357,6 @@
       wx.CallAfter (self.__updateInsertionPoint, event.GetEventObject ())
 
 
-  # ---------------------------------------------------------------------------
-  # Key-Down-Eventtrap for wx.MSW's ComboBox widgets
-  # ---------------------------------------------------------------------------
-
-  def __mswKeyDown (self, event):
-
-    keycode = event.GetKeyCode ()
-    unikey  = event.GetUnicodeKey ()
-    command = None
-
-    if keycode in [wx.WXK_LEFT, wx.WXK_RIGHT]:
-      (command, args) = GFKeyMapper.KeyMapper.getEvent (keycode,
-          event.ShiftDown (),
-          event.CmdDown (),
-          event.AltDown ())
-
-    if command:
-      self._request (command, triggerName = args)
-    else:
-      event.Skip ()
-
-
 # =============================================================================
 # Configuration
 # =============================================================================





reply via email to

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