]> git.saurik.com Git - wxWidgets.git/commitdiff
Consistent tab behaviour
authorJulian Smart <julian@anthemion.co.uk>
Tue, 15 Jun 2004 15:37:03 +0000 (15:37 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 15 Jun 2004 15:37:03 +0000 (15:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/textctrl.cpp
src/mac/classic/textctrl.cpp

index eec92c414c277b2de0e143f8cac8abdeeb3c6b6a..86d6e450d405e8666282dc39bc6de5663648f0d6 100644 (file)
@@ -1987,9 +1987,16 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
         case WXK_TAB:
             if ( !(m_windowStyle & wxTE_PROCESS_TAB))
             {
         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;
     }
 
             break;
     }
 
index 3819c0cd2e4d5028f5f5df1d5b9d4d128b61c79d..18ebe8307f56d3ae89885e08e143aa42b994cce8 100644 (file)
@@ -1651,8 +1651,14 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
         case WXK_TAB:
             if ( !(m_windowStyle & wxTE_PROCESS_TAB))
             {
         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;
     }
             }
             break;
     }