]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/spinctlg.cpp
Fix assert on wxCalendarCtrl creation under Windows 7.
[wxWidgets.git] / src / generic / spinctlg.cpp
index 84cc154b40b3a2b1cc5d8e8c6bdf492124dea841..30193cdd0294913b1eb7235111db507dcc74710c 100644 (file)
@@ -448,6 +448,7 @@ void wxSpinCtrlGenericBase::SetValue(const wxString& text)
     {
         m_textCtrl->SetValue(text);
         m_textCtrl->SetSelection(0, -1);
+        m_textCtrl->SetInsertionPointEnd();
     }
 }
 
@@ -478,6 +479,7 @@ bool wxSpinCtrlGenericBase::DoSetValue(double val)
         m_value = val;
         str.ToDouble( &m_value );    // wysiwyg for textctrl
         m_textCtrl->SetValue( str );
+        m_textCtrl->SetInsertionPointEnd();
         m_textCtrl->DiscardEdits();
         return true;
     }