From: Vadim Zeitlin Date: Thu, 6 May 2010 12:58:36 +0000 (+0000) Subject: Don't accept focus in the dummy main generic spin control window. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/64b62afea87ba1c40888fda71d68d7e919b43e60 Don't accept focus in the dummy main generic spin control window. This window is only used as a container for the sub-windows and shouldn't accept focus, trying to set it to it doesn't work anyhow (see #12004). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/generic/spinctlg.h b/include/wx/generic/spinctlg.h index 9d8fe791c5..4360c9395c 100644 --- a/include/wx/generic/spinctlg.h +++ b/include/wx/generic/spinctlg.h @@ -92,6 +92,10 @@ public: void OnTextEnter(wxCommandEvent& event); void OnTextChar(wxKeyEvent& event); + // this window itself is used only as a container for its sub windows so it + // shouldn't accept the focus at all + virtual bool AcceptsFocus() const { return false; } + friend class wxSpinCtrlTextGeneric; protected: