X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2646f485163f410baaad5bcf49028c604a352d19..03d51a2d4095e3a2da174f8d6963c4802e636e95:/src/mac/classic/textctrl.cpp diff --git a/src/mac/classic/textctrl.cpp b/src/mac/classic/textctrl.cpp index 2b03417c0f..18ebe8307f 100644 --- a/src/mac/classic/textctrl.cpp +++ b/src/mac/classic/textctrl.cpp @@ -1640,7 +1640,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) } } - // this will make wxWindows eat the ENTER key so that + // this will make wxWidgets eat the ENTER key so that // we actually prevent line wrapping in a single line // text control eat_key = TRUE; @@ -1649,22 +1649,17 @@ 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() ; + Navigate(!event.ShiftDown(), event.ControlDown()); return; } + else + { + // This is necessary (don't know why) or the tab will not + // be inserted. + WriteText(wxT("\t")); + } break; }