From 42a3ecf573525b941aaa4aad4a5429412dc01521 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 27 Jun 2006 14:15:31 +0000 Subject: [PATCH] create text control with wxTE_PROCESS_ENTER style if we have wxPROCESS_ENTER ourselves (patch 1512803) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/combocmn.cpp | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index ebac08be3f..4f327c2c5a 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -743,24 +743,23 @@ void wxComboCtrlBase::InstallInputHandlers( bool alsoTextCtrl ) m_extraEvtHandler = inputHandler; } -void wxComboCtrlBase::CreateTextCtrl( int extraStyle, const wxValidator& validator ) +void +wxComboCtrlBase::CreateTextCtrl(int style, const wxValidator& validator) { if ( !(m_windowStyle & wxCB_READONLY) ) { - m_text = new wxTextCtrl(this, - wxID_ANY, - m_valueString, - wxDefaultPosition, - wxDefaultSize, - // wxTE_PROCESS_TAB is needed because on Windows, wxTAB_TRAVERSAL is - // not used by the wxPropertyGrid and therefore the tab is - // processed by looking at ancestors to see if they have - // wxTAB_TRAVERSAL. The navigation event is then sent to - // the wrong window. - wxTE_PROCESS_TAB | - wxTE_PROCESS_ENTER | - extraStyle, - validator); + // wxTE_PROCESS_TAB is needed because on Windows, wxTAB_TRAVERSAL is + // not used by the wxPropertyGrid and therefore the tab is processed by + // looking at ancestors to see if they have wxTAB_TRAVERSAL. The + // navigation event is then sent to the wrong window. + style |= wxTE_PROCESS_TAB; + + if ( HasFlag(wxPROCESS_ENTER) ) + style |= wxTE_PROCESS_ENTER; + + m_text = new wxTextCtrl(this, wxID_ANY, m_valueString, + wxDefaultPosition, wxDefaultSize, + style, validator); // This is required for some platforms (GTK+ atleast) m_text->SetSizeHints(2,4); -- 2.47.2