From 6ad49e18b9ed3623b263e7b45e78f53dec395ede Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 15 Jun 2004 15:37:03 +0000 Subject: [PATCH] Consistent tab behaviour git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/textctrl.cpp | 11 +++++++++-- src/mac/classic/textctrl.cpp | 10 ++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) 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; } -- 2.45.2