]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/combobox.cpp
Use a " " (space) for the menu item if an empty string is used for an item in a wxCho...
[wxWidgets.git] / src / gtk / combobox.cpp
index fe74ecbd95c4831f84e7f2c3319ce46f085ccbab..a0fb1e962dd28544452c873b3d1ab2662808e05a 100644 (file)
@@ -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