]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/spinctrl.cpp
Use the size value passed to the ctor to set the window's minimum size.
[wxWidgets.git] / src / gtk / spinctrl.cpp
index b1d33df2312f25376136e69f798b394b54559cdb..a15f637dda564761191a956cf7112403f2c451f8 100644 (file)
@@ -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();
 }
 
     event.Skip();
 }