+ if (!combo->m_hasVMT) return;
+
+ wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() );
+ event.SetString( combo->GetValue() );
+ event.SetEventObject( combo );
+ combo->GetEventHandler()->ProcessEvent( event );
+}
+
+//-----------------------------------------------------------------------------
+// wxComboBox
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(wxComboBox,wxControl)
+
+BEGIN_EVENT_TABLE(wxComboBox, wxControl)
+ EVT_SIZE(wxComboBox::OnSize)
+ EVT_CHAR(wxComboBox::OnChar)
+END_EVENT_TABLE()
+
+bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
+ const wxPoint& pos, const wxSize& size,
+ int n, const wxString choices[],
+ long style, const wxValidator& validator,
+ const wxString& name )
+{
+ m_alreadySent = FALSE;
+ m_needParent = TRUE;
+ m_acceptsFocus = TRUE;
+
+ PreCreation( parent, id, pos, size, style, name );
+
+#if wxUSE_VALIDATORS
+ SetValidator( validator );
+#endif
+
+ m_widget = gtk_combo_new();
+
+ // make it more useable
+ gtk_combo_set_use_arrows_always(GTK_COMBO(m_widget), TRUE);
+
+ wxSize newSize = size;
+ if (newSize.x == -1)
+ newSize.x = 100;
+ if (newSize.y == -1)
+ newSize.y = 26;
+ SetSize( newSize.x, newSize.y );
+
+ GtkWidget *list = GTK_COMBO(m_widget)->list;
+
+ for (int i = 0; i < n; i++)
+ {
+ /* don't send first event, which GTK sends aways when
+ inserting the first item */
+ m_alreadySent = TRUE;