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
This commit is contained in:
Vadim Zeitlin
2002-04-16 14:55:56 +00:00
parent fe5a9cab50
commit 2adfb497e6

View File

@@ -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 <Return> 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;