]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/textctrl.cpp
use GtkIMContext variable, not GtkIMMulticontext, we don't use functions that take...
[wxWidgets.git] / src / mac / carbon / textctrl.cpp
index 6217f191c6953c1d748e7d69984bc74417d14079..b1ae31ebe5eae8db343d3d6f4873eea58b71591c 100644 (file)
@@ -1985,22 +1985,23 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
             break;
 
         case WXK_TAB:
-            // always produce navigation event - even if we process TAB
-            // ourselves the fact that we got here means that the user code
-            // decided to skip processing of this TAB - probably to let it
-            // do its default job.
+            if ( !(m_windowStyle & wxTE_PROCESS_TAB))
             {
-                wxNavigationKeyEvent eventNav;
-                eventNav.SetDirection(!event.ShiftDown());
-                eventNav.SetWindowChange(event.ControlDown());
-                eventNav.SetEventObject(this);
-
-                if ( GetParent()->GetEventHandler()->ProcessEvent(eventNav) )
-                    return;
-
-                event.Skip() ;
+                int flags = 0;
+                if (!event.ShiftDown())
+                    flags |= wxNavigationKeyEvent::IsForward ;
+                if (event.ControlDown())
+                    flags |= wxNavigationKeyEvent::WinChange ;
+                Navigate(flags);
                 return;
             }
+            else
+            {
+                // This is necessary (don't know why) or the tab will not
+                // be inserted.
+                WriteText(wxT("\t"));
+            }
+            
             break;
     }