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, // wxTE_PROCESS_TAB is needed because on Windows, wxTAB_TRAVERSAL is
wxID_ANY, // not used by the wxPropertyGrid and therefore the tab is processed by
m_valueString, // looking at ancestors to see if they have wxTAB_TRAVERSAL. The
wxDefaultPosition, // navigation event is then sent to the wrong window.
wxDefaultSize, style |= wxTE_PROCESS_TAB;
// wxTE_PROCESS_TAB is needed because on Windows, wxTAB_TRAVERSAL is
// not used by the wxPropertyGrid and therefore the tab is if ( HasFlag(wxPROCESS_ENTER) )
// processed by looking at ancestors to see if they have style |= wxTE_PROCESS_ENTER;
// wxTAB_TRAVERSAL. The navigation event is then sent to
// the wrong window. m_text = new wxTextCtrl(this, wxID_ANY, m_valueString,
wxTE_PROCESS_TAB | wxDefaultPosition, wxDefaultSize,
wxTE_PROCESS_ENTER | style, validator);
extraStyle,
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);