X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0eaa1d68c29cd273971be9d60008045e470c2d46..acc0ebd7a871124d4d6b36069340227e6c584f38:/src/mac/textctrl.cpp diff --git a/src/mac/textctrl.cpp b/src/mac/textctrl.cpp index 9ff3b81637..0724fe9da9 100644 --- a/src/mac/textctrl.cpp +++ b/src/mac/textctrl.cpp @@ -107,6 +107,15 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, MacPreControlCreate( parent , id , "" , pos , mySize ,style, validator , name , &bounds , title ) ; + if ( m_windowStyle & wxTE_MULTILINE ) + { + wxASSERT_MSG( !(m_windowStyle & wxTE_PROCESS_ENTER), + wxT("wxTE_PROCESS_ENTER style is ignored for multiline text controls (they always process it)") ); + + m_windowStyle |= wxTE_PROCESS_ENTER; + } + + m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , "\p" , true , 0 , 0 , 1, ( style & wxTE_PASSWORD ) ? kControlEditTextPasswordProc : kControlEditTextProc , (long) this ) ; MacPostControlCreate() ; @@ -653,7 +662,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) keychar = short(ev->message & charCodeMask); keycode = short(ev->message & keyCodeMask) >> 8 ; UMAHandleControlKey( m_macControl , keycode , keychar , ev->modifiers ) ; - if ( keychar >= 0x20 || event.KeyCode() == WXK_RETURN) + if ( keychar >= 0x20 || event.KeyCode() == WXK_RETURN || event.KeyCode() == WXK_DELETE || event.KeyCode() == WXK_BACK) { wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId); event.SetString( GetValue() ) ;