]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/spinctrl.cpp
fixed annoying beep when pressing space/return in the tree
[wxWidgets.git] / src / msw / spinctrl.cpp
index dbf5cdceef1a3bd91550f85a00294f72ad7b16e3..6057edf8377e3c53f203333e32fd10694d15c484 100644 (file)
@@ -352,6 +352,18 @@ int wxSpinCtrl::GetValue() const
     return n;
 }
 
+void wxSpinCtrl::SetSelection(long from, long to)
+{
+    // if from and to are both -1, it means (in wxWindows) that all text should
+    // be selected - translate into Windows convention
+    if ( (from == -1) && (to == -1) )
+    {
+        from = 0;
+    }
+
+    ::SendMessage((HWND)m_hwndBuddy, EM_SETSEL, (WPARAM)from, (LPARAM)to);
+}
+
 // ----------------------------------------------------------------------------
 // forward some methods to subcontrols
 // ----------------------------------------------------------------------------