X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/70a2c6562fcc7088076ab421419069ef50e4a7d3..578dc95029e761a59911b7c1bc09f59384d64ddf:/src/os2/spinctrl.cpp diff --git a/src/os2/spinctrl.cpp b/src/os2/spinctrl.cpp index 2fa04e7049..d526cfa43f 100644 --- a/src/os2/spinctrl.cpp +++ b/src/os2/spinctrl.cpp @@ -488,4 +488,20 @@ bool wxSpinCtrl::Show( return TRUE; } // end of wxSpinCtrl::Show +void wxSpinCtrl::SetSelection ( + long lFrom +, long lTo +) +{ + // + // If from and to are both -1, it means (in wxWindows) that all text should + // be selected - translate into Windows convention + // + if ((lFrom == -1) && (lTo == -1)) + { + lFrom = 0; + } + ::WinSendMsg(m_hWnd, EM_SETSEL, MPFROM2SHORT((USHORT)lFrom, (USHORT)lTo), (MPARAM)0); +} // end of wxSpinCtrl::SetSelection + #endif //wxUSE_SPINBTN