generate wxEVT_COMMAND_TEXT_ENTER for multiline controls too

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-03-08 00:23:36 +00:00
parent d0c3476bd6
commit 9a3952fad8

View File

@@ -1800,16 +1800,15 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
switch ( event.GetKeyCode() ) switch ( event.GetKeyCode() )
{ {
case WXK_RETURN: case WXK_RETURN:
if ( !HasFlag(wxTE_MULTILINE) )
{ {
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
InitCommandEvent(event); InitCommandEvent(event);
event.SetString(GetValue()); event.SetString(GetValue());
if ( GetEventHandler()->ProcessEvent(event) ) if ( GetEventHandler()->ProcessEvent(event) )
if ( !HasFlag(wxTE_MULTILINE) )
return; return;
//else: multiline controls need Enter for themselves
} }
//else: multiline controls need Enter for themselves
break; break;
case WXK_TAB: case WXK_TAB: