]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/combocmn.cpp
wxDFB: implemented Raise() and Lower() for TLWs
[wxWidgets.git] / src / common / combocmn.cpp
index 8fb796c2ccaa3761846f249699c53cc5215bad84..6ed975c8a863cc4e491d2b7f9ad9e5158a5c4244 100644 (file)
@@ -1651,22 +1651,8 @@ void wxComboCtrlBase::OnKeyEvent(wxKeyEvent& event)
     }
     else // no popup
     {
-        int keycode = event.GetKeyCode();
-
-        if ( keycode == WXK_TAB )
-        {
-            wxNavigationKeyEvent evt;
-
-            wxWindow* mainCtrl = GetMainWindowOfCompositeControl();
-
-            evt.SetFlags(wxNavigationKeyEvent::FromTab|
-                         (!event.ShiftDown() ? wxNavigationKeyEvent::IsForward
-                                             : wxNavigationKeyEvent::IsBackward));
-            evt.SetEventObject(mainCtrl);
-            evt.SetCurrentFocus(mainCtrl);
-            mainCtrl->GetParent()->GetEventHandler()->AddPendingEvent(evt);
+        if ( HandleAsNavigationKey(event) )
             return;
-        }
 
         if ( IsKeyPopupToggle(event) )
         {
@@ -1683,6 +1669,8 @@ void wxComboCtrlBase::OnKeyEvent(wxKeyEvent& event)
             return;
         }
 
+        int keycode = event.GetKeyCode();
+
         if ( (comboStyle & wxCB_READONLY) ||
              (keycode != WXK_RIGHT && keycode != WXK_LEFT) )
         {