]> git.saurik.com Git - wxWidgets.git/commitdiff
create text control with wxTE_PROCESS_ENTER style if we have wxPROCESS_ENTER ourselve...
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 27 Jun 2006 14:15:31 +0000 (14:15 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 27 Jun 2006 14:15:31 +0000 (14:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/combocmn.cpp

index ebac08be3fdc1768ca1445aff2d7c6e1b54f22da..4f327c2c5aa227f7171644ec9eb60739b2e62f51 100644 (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
-                                // 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);
 
         // This is required for some platforms (GTK+ atleast)
         m_text->SetSizeHints(2,4);