X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9ff4b6ccd9c918a4b7b83a6ed263a7d545bb32fb..703e3c42d11a74be69cc1dee560e2c0f359ac13f:/src/generic/odcombo.cpp diff --git a/src/generic/odcombo.cpp b/src/generic/odcombo.cpp index d0ca3c11f1..b9818d560c 100644 --- a/src/generic/odcombo.cpp +++ b/src/generic/odcombo.cpp @@ -228,7 +228,7 @@ void wxVListBoxComboPopup::DismissWithEvent() m_stringValue = wxEmptyString; if ( m_stringValue != m_combo->GetValue() ) - m_combo->SetValueWithEvent(m_stringValue); + m_combo->SetValueByUser(m_stringValue); m_value = selection; @@ -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 @@ -545,7 +545,7 @@ int wxVListBoxComboPopup::Append(const wxString& item) for ( i=0; iClear(); + // NB: This really needs to be SetValue() instead of ChangeValue(), + // as wxTextEntry API expects an event to be sent. SetValue(wxEmptyString); } +void wxOwnerDrawnComboBox::Clear() +{ + DoClear(); +} + 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); } @@ -1055,7 +1057,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; @@ -1072,7 +1074,7 @@ int wxOwnerDrawnComboBox::GetSelection() const void wxOwnerDrawnComboBox::GetSelection(long *from, long *to) const { - return wxComboCtrl::GetSelection(from, to); + wxComboCtrl::GetSelection(from, to); } int wxOwnerDrawnComboBox::DoInsertItems(const wxArrayStringsAdapter& items,