+#ifdef __WXGTK24__
+ if (!gtk_check_version(2,4,0))
+ {
+ gtk_entry_set_text( entry, wxGTK_CONV(value) );
+
+ if (style & wxCB_READONLY)
+ gtk_entry_set_editable( entry, FALSE );
+
+ g_signal_connect_after (entry, "changed",
+ G_CALLBACK (gtkcombobox_text_changed_callback), this);
+
+ g_signal_connect_after (m_widget, "changed",
+ G_CALLBACK (gtkcombobox_changed_callback), this);
+ }
+ else
+#endif
+ {
+ GtkCombo *combo = GTK_COMBO(m_widget);
+ // MSW's combo box shows the value and the selection is -1
+ gtk_entry_set_text( entry, wxGTK_CONV(value) );
+ gtk_list_unselect_all( GTK_LIST(combo->list) );
+
+ if (style & wxCB_READONLY)
+ gtk_entry_set_editable( entry, FALSE );
+
+ // "show" and "hide" events are generated when user click on the combobox button which popups a list
+ // this list is the "popwin" gtk widget
+ g_signal_connect (GTK_COMBO(combo)->popwin, "hide",
+ G_CALLBACK (gtkcombo_popup_hide_callback), this);
+ g_signal_connect (GTK_COMBO(combo)->popwin, "show",
+ G_CALLBACK (gtkcombo_popup_show_callback), this);
+ g_signal_connect_after (combo->list, "select-child",
+ G_CALLBACK (gtkcombo_combo_select_child_callback),
+ this);
+ g_signal_connect_after (entry, "changed",
+ G_CALLBACK (gtkcombo_text_changed_callback), this);
+
+ // This is required for tool bar support
+ // Doesn't currently work
+// wxSize setsize = GetSize();
+// gtk_widget_set_size_request( m_widget, setsize.x, setsize.y );
+ }