]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textctrl.cpp
MDI fixes
[wxWidgets.git] / src / msw / textctrl.cpp
index dcf18535fbb8623fc8b571b539ee7934cc0e9e93..7fa765d4a4cbaf8f90a5996f080b8ab002aa8a02 100644 (file)
@@ -95,7 +95,6 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
                         const wxValidator& validator,
                         const wxString& name)
 {
-  m_fileName = "";
   SetName(name);
   SetValidator(validator);
   if (parent) parent->AddChild(this);
@@ -709,11 +708,6 @@ void wxTextCtrl::ShowPosition(long pos)
     
     int linesToScroll = specifiedLineLineNo - currentLineLineNo;
 
-/*
-    wxDebugMsg("Caret line: %d; Current visible line: %d; Specified line: %d; lines to scroll: %d\n",
-      currentLineLineNo1, currentLineLineNo, specifiedLineLineNo, linesToScroll);
-*/
-
     if (linesToScroll != 0)
       (void)SendMessage(hWnd, EM_LINESCROLL, (WPARAM)0, (LPARAM)MAKELPARAM(linesToScroll, 0));
 }
@@ -976,9 +970,10 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
             break;
 
         case WXK_RETURN:
+        {
             wxASSERT_MSG( m_windowStyle & wxTE_PROCESS_ENTER,
                           "this text ctrl should never receive return" );
-            if ( m_windowStyle & wxTE_MULTILINE == 0 )
+            if ( (m_windowStyle & wxTE_MULTILINE) == 0 )
             {
                 wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
                 event.SetEventObject( this );
@@ -988,7 +983,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
             //else: multiline controls need Enter for themselves
 
             break;
-
+        }
         case WXK_TAB:
             // only produce navigation event if we don't process TAB ourself or
             // if it's a Shift-Tab keypress (we assume nobody will ever need
@@ -1006,12 +1001,14 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
                 if ( GetEventHandler()->ProcessEvent(eventNav) )
                     return;
             }
+            break;
     }
     
     // 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
-    Default();
+    //Default();
+    event.Skip();
 }
 
 long wxTextCtrl::MSWGetDlgCode()