]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied #8804 ([wxMac] wxSpinCtrl behaviour)
authorJulian Smart <julian@anthemion.co.uk>
Fri, 25 Sep 2009 15:25:25 +0000 (15:25 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 25 Sep 2009 15:25:25 +0000 (15:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/spinctlg.cpp
src/osx/spinctrl_osx.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;
     }
index 1e56099b01d4afc68226e72831d69d735397a915..8e7042d10e88528f501dbb3502480acf4f52bb68 100644 (file)
@@ -395,6 +395,8 @@ void wxSpinCtrl::SetTextValue(int val)
     // select all text
     m_text->SetSelection(0, -1);
 
+    m_text->SetInsertionPointEnd();
+
     // and give focus to the control!
     // m_text->SetFocus();    Why???? TODO.
 }