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
This commit is contained in:
Vadim Zeitlin
2006-06-27 14:15:31 +00:00
parent 57b49e9445
commit 42a3ecf573

View File

@@ -743,24 +743,23 @@ void wxComboCtrlBase::InstallInputHandlers( bool alsoTextCtrl )
m_extraEvtHandler = inputHandler; m_extraEvtHandler = inputHandler;
} }
void wxComboCtrlBase::CreateTextCtrl( int extraStyle, const wxValidator& validator ) void
wxComboCtrlBase::CreateTextCtrl(int style, const wxValidator& validator)
{ {
if ( !(m_windowStyle & wxCB_READONLY) ) 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 // wxTE_PROCESS_TAB is needed because on Windows, wxTAB_TRAVERSAL is
// not used by the wxPropertyGrid and therefore the tab is // not used by the wxPropertyGrid and therefore the tab is processed by
// processed by looking at ancestors to see if they have // looking at ancestors to see if they have wxTAB_TRAVERSAL. The
// wxTAB_TRAVERSAL. The navigation event is then sent to // navigation event is then sent to the wrong window.
// the wrong window. style |= wxTE_PROCESS_TAB;
wxTE_PROCESS_TAB |
wxTE_PROCESS_ENTER | if ( HasFlag(wxPROCESS_ENTER) )
extraStyle, style |= wxTE_PROCESS_ENTER;
validator);
m_text = new wxTextCtrl(this, wxID_ANY, m_valueString,
wxDefaultPosition, wxDefaultSize,
style, validator);
// This is required for some platforms (GTK+ atleast) // This is required for some platforms (GTK+ atleast)
m_text->SetSizeHints(2,4); m_text->SetSizeHints(2,4);