diff --git a/include/wx/generic/spinctlg.h b/include/wx/generic/spinctlg.h index 19a78bb881..2cc581c928 100644 --- a/include/wx/generic/spinctlg.h +++ b/include/wx/generic/spinctlg.h @@ -96,7 +96,7 @@ public: // shouldn't accept the focus at all and any attempts to explicitly set // focus to it should give focus to its text constol part virtual bool AcceptsFocus() const { return false; } - virtual void SetFocus() { if ( m_textCtrl ) m_textCtrl->SetFocus(); } + virtual void SetFocus(); friend class wxSpinCtrlTextGeneric; diff --git a/src/generic/spinctlg.cpp b/src/generic/spinctlg.cpp index d872780e9c..d3c1cdb4a6 100644 --- a/src/generic/spinctlg.cpp +++ b/src/generic/spinctlg.cpp @@ -279,6 +279,12 @@ void wxSpinCtrlGenericBase::DoMoveWindow(int x, int y, int width, int height) // operations forwarded to the subcontrols // ---------------------------------------------------------------------------- +void wxSpinCtrlGenericBase::SetFocus() +{ + if ( m_textCtrl ) + m_textCtrl->SetFocus(); +} + bool wxSpinCtrlGenericBase::Enable(bool enable) { // Notice that we never enable this control itself, it must stay disabled