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:
@@ -1800,16 +1800,15 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
|
||||
switch ( event.GetKeyCode() )
|
||||
{
|
||||
case WXK_RETURN:
|
||||
if ( !HasFlag(wxTE_MULTILINE) )
|
||||
{
|
||||
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
|
||||
InitCommandEvent(event);
|
||||
event.SetString(GetValue());
|
||||
if ( GetEventHandler()->ProcessEvent(event) )
|
||||
if ( !HasFlag(wxTE_MULTILINE) )
|
||||
return;
|
||||
//else: multiline controls need Enter for themselves
|
||||
}
|
||||
//else: multiline controls need Enter for themselves
|
||||
|
||||
break;
|
||||
|
||||
case WXK_TAB:
|
||||
|
Reference in New Issue
Block a user