X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/055e633de60a9f08d5d4f9826c323d280fb46085..6811c2f3e3e8afc1872280dfd1464565a3ddb306:/src/gtk/spinctrl.cpp diff --git a/src/gtk/spinctrl.cpp b/src/gtk/spinctrl.cpp index b1d33df231..a15f637dda 100644 --- a/src/gtk/spinctrl.cpp +++ b/src/gtk/spinctrl.cpp @@ -290,6 +290,16 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event ) } } + if ((event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER)) + { + wxCommandEvent evt( wxEVT_COMMAND_TEXT_ENTER, m_windowId ); + evt.SetEventObject(this); + GtkSpinButton *gsb = GTK_SPIN_BUTTON(m_widget); + wxString val = wxGTK_CONV_BACK( gtk_entry_get_text( &gsb->entry ) ); + evt.SetString( val ); + if (GetEventHandler()->ProcessEvent(evt)) return; + } + event.Skip(); }