X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/327788acc5e4915df4e9e97db7fb08a4c4a00cdd..f0834140313212fc54d09e28d21a95476d6545f2:/src/mac/spinctrl.cpp diff --git a/src/mac/spinctrl.cpp b/src/mac/spinctrl.cpp index a083c8a3c5..22553d47f1 100644 --- a/src/mac/spinctrl.cpp +++ b/src/mac/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