// wxComboBox
//-----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxChoice)
-
BEGIN_EVENT_TABLE(wxComboBox, wxChoice)
EVT_CHAR(wxComboBox::OnChar)
}
if (HasFlag(wxCB_SORT))
- m_strings = new wxSortedArrayString();
+ m_strings = new wxGtkCollatedArrayString();
GTKCreateComboBoxWidget();
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
// ----------------------------------------------------------------------------
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