]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textctrl.cpp
fix for id of CHAR_HOOK events
[wxWidgets.git] / src / msw / textctrl.cpp
index 162933d4c1471f6e085f39a3c398e60dd76ecd98..794d146e783f4a06d6d1f95a6b52191b665809e8 100644 (file)
@@ -353,10 +353,8 @@ void wxTextCtrl::AdoptAttributesFromHWND()
 
 void wxTextCtrl::SetupColours()
 {
 
 void wxTextCtrl::SetupColours()
 {
-    // FIXME why is bg colour not inherited from parent?
-
     wxColour bkgndColour;
     wxColour bkgndColour;
-    if (IsEditable())
+    if (IsEditable() || (m_windowStyle & wxTE_MULTILINE))
         bkgndColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW);
     else
         bkgndColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE);
         bkgndColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW);
     else
         bkgndColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE);
@@ -895,30 +893,19 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
             // 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.
             // 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.
-            //
-            // NB: Notice that Ctrl-Tab is handled elsewhere and Alt-Tab is
-            //     handled by Windows
             {
                 wxNavigationKeyEvent eventNav;
                 eventNav.SetDirection(!event.ShiftDown());
             {
                 wxNavigationKeyEvent eventNav;
                 eventNav.SetDirection(!event.ShiftDown());
-                eventNav.SetWindowChange(FALSE);
+                eventNav.SetWindowChange(event.ControlDown());
                 eventNav.SetEventObject(this);
 
                 eventNav.SetEventObject(this);
 
-                if ( GetEventHandler()->ProcessEvent(eventNav) )
+                if ( GetParent()->GetEventHandler()->ProcessEvent(eventNav) )
                     return;
             }
             break;
                     return;
             }
             break;
-
-        default:
-            event.Skip();
-            return;
     }
 
     }
 
-    // don't just call event.Skip() because this will cause TABs and ENTERs
-    // be passed upwards and we don't always want this - instead process it
-    // right here
-
-    // FIXME
+    // no, we didn't process it
     event.Skip();
 }
 
     event.Skip();
 }