+void wxComboBox::OnChar( wxKeyEvent &event )
+{
+ if ( event.GetKeyCode() == WXK_RETURN )
+ {
+ // GTK automatically selects an item if its in the list
+ wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, GetId());
+ event.SetString( GetValue() );
+ event.SetInt( GetSelection() );
+ event.SetEventObject( this );
+
+ if (!GetEventHandler()->ProcessEvent( event ))
+ {
+ // This will invoke the dialog default action, such
+ // as the clicking the default button.
+
+ wxWindow *top_frame = m_parent;
+ while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
+ top_frame = top_frame->GetParent();
+
+ if (top_frame && GTK_IS_WINDOW(top_frame->m_widget))
+ {
+ GtkWindow *window = GTK_WINDOW(top_frame->m_widget);
+
+ if (window->default_widget)
+ gtk_widget_activate (window->default_widget);
+ }
+ }
+
+ // Catch GTK event so that GTK doesn't open the drop
+ // down list upon RETURN.
+ return;
+ }
+
+ event.Skip();
+}
+
+void wxComboBox::DisableEvents()