X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/26c7026db3bf846af2827df9fb6845013b22661a..708cc39462e4f113ab1a52b502b79d1e473059e7:/src/gtk/combobox.cpp?ds=sidebyside diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index fe74ecbd95..a0fb1e962d 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -118,7 +118,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 +276,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 // ---------------------------------------------------------------------------- @@ -352,19 +360,11 @@ void wxComboBox::OnUpdateSelectAll(wxUpdateUIEvent& event) void wxComboBox::Popup() { - gtk_combo_box_popup( GTK_COMBO_BOX(m_widget) ); - - wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_DROPDOWN, GetId() ); - event.SetEventObject( this ); - HandleWindowEvent( event ); + gtk_combo_box_popup( GTK_COMBO_BOX(m_widget) ); } void wxComboBox::Dismiss() { gtk_combo_box_popdown( GTK_COMBO_BOX(m_widget) ); - - wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_CLOSEUP, GetId() ); - event.SetEventObject( this ); - HandleWindowEvent( event ); } #endif // wxUSE_COMBOBOX