From: Julian Smart Date: Tue, 15 Jun 2004 15:37:03 +0000 (+0000) Subject: Consistent tab behaviour X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6ad49e18b9ed3623b263e7b45e78f53dec395ede Consistent tab behaviour git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index eec92c414c..86d6e450d4 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -1987,9 +1987,16 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) case WXK_TAB: if ( !(m_windowStyle & wxTE_PROCESS_TAB)) { - if (Navigate(!event.ShiftDown(), event.ControlDown())) - return; + 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; } diff --git a/src/mac/classic/textctrl.cpp b/src/mac/classic/textctrl.cpp index 3819c0cd2e..18ebe8307f 100644 --- a/src/mac/classic/textctrl.cpp +++ b/src/mac/classic/textctrl.cpp @@ -1651,8 +1651,14 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) case WXK_TAB: if ( !(m_windowStyle & wxTE_PROCESS_TAB)) { - if (Navigate(!event.ShiftDown(), event.ControlDown())) - return; + 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; }