X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2ae8a353528c12be92dbaa699f2ffc670188ab5b..a811affe70feeb727bf7fbd2748a48ded6ec3b9b:/src/mac/carbon/spinctrl.cpp

diff --git a/src/mac/carbon/spinctrl.cpp b/src/mac/carbon/spinctrl.cpp
index a083c8a3c5..22553d47f1 100644
--- a/src/mac/carbon/spinctrl.cpp
+++ b/src/mac/carbon/spinctrl.cpp
@@ -319,4 +319,15 @@ void wxSpinCtrl::SetRange(int min, int max)
     m_btn->SetRange(min, max);
 }
 
+void wxSpinCtrl::SetSelection(long from, long to)
+{
+    // if from and to are both -1, it means (in wxWindows) that all text should
+    // be selected
+    if ( (from == -1) && (to == -1) )
+    {
+        from = 0;     
+    }
+    m_text->SetSelection(from, to);
+}     
+
 #endif // wxUSE_SPINCTRL