From 8bf3196d66061acb022db8ea07acd15614288b4b Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Garcia Date: Fri, 7 Jan 2000 18:22:38 +0000 Subject: [PATCH] Fixed problem with tab traversal in wxSpinCtrl (added SetFocus()) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/spinctrl.h | 1 + src/msw/spinctrl.cpp | 5 +++++ 2 files changed, 6 insertions(+) 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 // ----------------------------------------------------------------------------