]> git.saurik.com Git - wxWidgets.git/commitdiff
Mostly change the wxOwnerDrawnComboBox text value using ChangeValue() instead of...
authorJaakko Salli <jaakko.salli@dnainternet.net>
Fri, 17 Dec 2010 11:39:38 +0000 (11:39 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Fri, 17 Dec 2010 11:39:38 +0000 (11:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/odcombo.cpp

index 557a5332685c56697bc9e748e28218c38fe23279..ee33e004824f7404f28e7fdd43a187442763a86c 100644 (file)
@@ -371,7 +371,7 @@ bool wxVListBoxComboPopup::HandleKey( int keycode, bool saturate, wxChar keychar
         return true;
 
     if ( value >= 0 )
-        m_combo->SetValue(m_strings[value]);
+        m_combo->ChangeValue(m_strings[value]);
 
     // The m_combo->SetValue() call above sets m_value to the index of this
     // string. But if there are more identical string, the index is of the
@@ -993,6 +993,8 @@ void wxOwnerDrawnComboBox::DoClear()
 
     GetVListBoxComboPopup()->Clear();
 
+    // NB: This really needs to be SetValue() instead of ChangeValue(),
+    //     as wxTextEntry API expects an event to be sent.
     SetValue(wxEmptyString);
 }
 
@@ -1006,7 +1008,7 @@ void wxOwnerDrawnComboBox::DoDeleteOneItem(unsigned int n)
     wxCHECK_RET( IsValid(n), wxT("invalid index in wxOwnerDrawnComboBox::Delete") );
 
     if ( GetSelection() == (int) n )
-        SetValue(wxEmptyString);
+        ChangeValue(wxEmptyString);
 
     GetVListBoxComboPopup()->Delete(n);
 }
@@ -1060,7 +1062,7 @@ void wxOwnerDrawnComboBox::Select(int n)
 
     // Refresh text portion in control
     if ( m_text )
-        m_text->SetValue( str );
+        m_text->ChangeValue( str );
     else
         m_valueString = str;