From 2adfb497e666354303ea6bb0e468f1e53811ad55 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 16 Apr 2002 14:55:56 +0000 Subject: [PATCH] always let the multiline text control process the Enter key presses git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/textctrl.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index cee29ac19e..a5acb508d2 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -1217,7 +1217,6 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) long wxTextCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) { - // we always want the characters and the arrows if ( nMsg == WM_GETDLGCODE ) { // we always want the chars and the arrows @@ -1225,14 +1224,18 @@ long wxTextCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) // we may have several different cases: // 1. normal case: both TAB and ENTER are used for dialog navigation - // 2. ctrl which wants TAB for itself: ENTER is used to pass to the next - // control in the dialog - // 3. ctrl which wants ENTER for itself: TAB is used for dialog navigation - // 4. ctrl which wants both TAB and ENTER: Ctrl-ENTER is used to pass to - // the next control - if ( m_windowStyle & wxTE_PROCESS_ENTER ) + // 2. ctrl which wants TAB for itself: ENTER is used to pass to the + // next control in the dialog + // 3. ctrl which wants ENTER for itself: TAB is used for dialog + // navigation + // 4. ctrl which wants both TAB and ENTER: Ctrl-ENTER is used to pass + // to the next control + + // the multiline edit control should always get for itself + if ( HasFlag(wxTE_PROCESS_ENTER) || HasFlag(wxTE_MULTILINE) ) lDlgCode |= DLGC_WANTMESSAGE; - if ( m_windowStyle & wxTE_PROCESS_TAB ) + + if ( HasFlag(wxTE_PROCESS_TAB) ) lDlgCode |= DLGC_WANTTAB; return lDlgCode; -- 2.45.2