diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index c202ba56eb..63162e8ed0 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -49,6 +49,7 @@ gtk_combo_clicked_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo ) event.SetInt( combo->GetSelection() ); event.SetString( combo->GetStringSelection() ); event.SetEventObject( combo ); + combo->GetEventHandler()->ProcessEvent( event ); } @@ -164,11 +165,11 @@ void wxComboBox::AppendCommon( const wxString &item ) GtkWidget *list_item = gtk_list_item_new_with_label( item.mbc_str() ); + gtk_container_add( GTK_CONTAINER(list), list_item ); + gtk_signal_connect( GTK_OBJECT(list_item), "select", GTK_SIGNAL_FUNC(gtk_combo_clicked_callback), (gpointer)this ); - gtk_container_add( GTK_CONTAINER(list), list_item ); - if (GTK_WIDGET_REALIZED(m_widget)) { gtk_widget_realize( list_item ); diff --git a/src/gtk1/combobox.cpp b/src/gtk1/combobox.cpp index c202ba56eb..63162e8ed0 100644 --- a/src/gtk1/combobox.cpp +++ b/src/gtk1/combobox.cpp @@ -49,6 +49,7 @@ gtk_combo_clicked_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo ) event.SetInt( combo->GetSelection() ); event.SetString( combo->GetStringSelection() ); event.SetEventObject( combo ); + combo->GetEventHandler()->ProcessEvent( event ); } @@ -164,11 +165,11 @@ void wxComboBox::AppendCommon( const wxString &item ) GtkWidget *list_item = gtk_list_item_new_with_label( item.mbc_str() ); + gtk_container_add( GTK_CONTAINER(list), list_item ); + gtk_signal_connect( GTK_OBJECT(list_item), "select", GTK_SIGNAL_FUNC(gtk_combo_clicked_callback), (gpointer)this ); - gtk_container_add( GTK_CONTAINER(list), list_item ); - if (GTK_WIDGET_REALIZED(m_widget)) { gtk_widget_realize( list_item );