+ wx_const_cast(wxSpinCtrl*, this)->BlockScrollEvent();
+ gtk_spin_button_update( GTK_SPIN_BUTTON(m_widget) );
+ wx_const_cast(wxSpinCtrl*, this)->UnblockScrollEvent();
+
+ return m_pos;
+}
+
+void wxSpinCtrl::SetValue( const wxString& value )
+{
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid spin button") );
+
+ int n;
+ if ( (wxSscanf(value, wxT("%d"), &n) == 1) )
+ {
+ // a number - set it
+ SetValue(n);
+ }
+ else
+ {
+ // invalid number - set text as is (wxMSW compatible)
+ BlockScrollEvent();
+ gtk_entry_set_text( GTK_ENTRY(m_widget), wxGTK_CONV( value ) );
+ UnblockScrollEvent();
+ }