diff --git a/docs/changes.txt b/docs/changes.txt index afabf1e762..74912e90ce 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -195,3 +195,4 @@ wxOSX/Cocoa: - Provide native implementation of wxStandardPaths (Tobias Taschner). - Add wxTE_{RIGHT,CENTER} support for multiline wxTextCtrl (Andreas Falkenhahn). - Don't leave wxSlider labels shown when the slider itself is hidden. +- Don't generate wxEVT_TEXT_ENTER for controls without wxTE_PROCESS_ENTER. diff --git a/samples/text/text.cpp b/samples/text/text.cpp index 37fd312acb..f3fa5c9ffc 100644 --- a/samples/text/text.cpp +++ b/samples/text/text.cpp @@ -1160,7 +1160,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) m_tab->SetClientData((void *)wxT("tab")); m_enter = new MyTextCtrl( this, 100, wxT("Multiline, allow processing."), - wxPoint(180,170), wxSize(200,70), wxTE_MULTILINE); + wxPoint(180,170), wxSize(200,70), wxTE_MULTILINE | wxTE_PROCESS_ENTER ); m_enter->SetClientData((void *)wxT("enter")); m_textrich = new MyTextCtrl(this, wxID_ANY, wxT("Allows more than 30Kb of text\n") diff --git a/src/osx/textctrl_osx.cpp b/src/osx/textctrl_osx.cpp index cb434d6f1d..f319655294 100644 --- a/src/osx/textctrl_osx.cpp +++ b/src/osx/textctrl_osx.cpp @@ -103,14 +103,6 @@ bool wxTextCtrl::Create( wxWindow *parent, if ( !wxTextCtrlBase::Create( parent, id, pos, size, style & ~(wxHSCROLL | wxVSCROLL), validator, name ) ) return false; - if ( m_windowStyle & wxTE_MULTILINE ) - { - // always turn on this style for multi-line controls - m_windowStyle |= wxTE_PROCESS_ENTER; - style |= wxTE_PROCESS_ENTER ; - } - - SetPeer(wxWidgetImpl::CreateTextControl( this, GetParent(), GetId(), str, pos, size, style, GetExtraStyle() )); MacPostControlCreate(pos, size) ;