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;
}
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);