X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6008ff4a554d52b9f5d9e369c1e90384e610d203..5c06430713828161946b48938d4510609f90a25c:/src/gtk/combobox.cpp diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index 69c1373dde..23f4becc49 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -64,8 +64,6 @@ gtkcombobox_popupshown_callback(GObject *WXUNUSED(gobject), // wxComboBox //----------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxChoice) - BEGIN_EVENT_TABLE(wxComboBox, wxChoice) EVT_CHAR(wxComboBox::OnChar) @@ -118,7 +116,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value, } if (HasFlag(wxCB_SORT)) - m_strings = new wxSortedArrayString(); + m_strings = new wxGtkCollatedArrayString(); GTKCreateComboBoxWidget(); @@ -276,6 +274,14 @@ wxComboBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) return GetDefaultAttributesFromGTKWidget(gtk_combo_box_entry_new, true); } +void wxComboBox::SetValue(const wxString& value) +{ + if ( HasFlag(wxCB_READONLY) ) + SetStringSelection(value); + else + wxTextEntry::SetValue(value); +} + // ---------------------------------------------------------------------------- // standard event handling // ----------------------------------------------------------------------------