X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/21fd55291b631eae9ccfd78866616aca6e573ebe..03d51a2d4095e3a2da174f8d6963c4802e636e95:/src/mac/carbon/textctrl.cpp diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 100978c50f..86d6e450d4 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -817,8 +817,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, | kControlGetsFocusOnClick | kControlSupportsLiveFeedback; /* create the control */ m_peer = new wxMacControl() ; - verify_noerr( CreateUserPaneControl( MAC_WXHWND(GetParent()->MacGetTopLevelWindowRef()) , &bounds, featurSet , , *m_peer ) ); - ) ) ; + verify_noerr( ::CreateUserPaneControl( MAC_WXHWND(GetParent()->MacGetTopLevelWindowRef()), &bounds, featurSet, *m_peer ) ); wxMacWindowClipper c(this) ; STPTextPaneVars *varsp ; @@ -1986,22 +1985,18 @@ 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; }