diff --git a/include/wx/msw/spinctrl.h b/include/wx/msw/spinctrl.h index 37f8e1c2e4..4a5d3d56aa 100644 --- a/include/wx/msw/spinctrl.h +++ b/include/wx/msw/spinctrl.h @@ -67,6 +67,7 @@ public: protected: virtual void DoMoveWindow(int x, int y, int width, int height); virtual wxSize DoGetBestSize() const; + virtual void SetFocus(); // the handler for wxSpinButton events void OnSpinChange(wxSpinEvent& event); diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index 3946d365a9..16672d0198 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -232,6 +232,11 @@ bool wxSpinCtrl::Enable(bool enable) return TRUE; } +void wxSpinCtrl::SetFocus() +{ + ::SetFocus((HWND)m_hwndBuddy); +} + // ---------------------------------------------------------------------------- // event processing // ----------------------------------------------------------------------------