diff --git a/src/mac/carbon/combobox.cpp b/src/mac/carbon/combobox.cpp index 6ae9d105c1..2341937b42 100644 --- a/src/mac/carbon/combobox.cpp +++ b/src/mac/carbon/combobox.cpp @@ -311,7 +311,12 @@ wxString wxComboBox::GetValue() const void wxComboBox::SetValue(const wxString& value) { - SetStringSelection( value ) ; + int s = FindString (value); + if (s == wxNOT_FOUND && !HasFlag(wxCB_READONLY) ) + { + m_choice->Append(value) ; + } + SetStringSelection( value ) ; } // Clipboard operations diff --git a/src/mac/combobox.cpp b/src/mac/combobox.cpp index 6ae9d105c1..2341937b42 100644 --- a/src/mac/combobox.cpp +++ b/src/mac/combobox.cpp @@ -311,7 +311,12 @@ wxString wxComboBox::GetValue() const void wxComboBox::SetValue(const wxString& value) { - SetStringSelection( value ) ; + int s = FindString (value); + if (s == wxNOT_FOUND && !HasFlag(wxCB_READONLY) ) + { + m_choice->Append(value) ; + } + SetStringSelection( value ) ; } // Clipboard operations