Make it possible to TAB-navigate among wxStaticBox children.

As wxStaticBox can now contain child windows, derive it from
wxNavigationEnabled<> to allow TAB-navigating among them. Without this, it was
impossible to switch focus from keyboard to any of the controls inside
wxStaticBox.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-09-20 16:00:07 +00:00
parent ea6e973ca2
commit 9b14c706b2

View File

@@ -17,6 +17,7 @@
#if wxUSE_STATBOX #if wxUSE_STATBOX
#include "wx/control.h" #include "wx/control.h"
#include "wx/containr.h"
extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBoxNameStr[]; extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBoxNameStr[];
@@ -24,13 +25,12 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBoxNameStr[];
// wxStaticBox: a grouping box with a label // wxStaticBox: a grouping box with a label
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxStaticBoxBase : public wxControl class WXDLLIMPEXP_CORE wxStaticBoxBase : public wxNavigationEnabled<wxControl>
{ {
public: public:
wxStaticBoxBase() { } wxStaticBoxBase() { }
// overridden base class virtuals // overridden base class virtuals
virtual bool AcceptsFocus() const { return false; }
virtual bool HasTransparentBackground() { return true; } virtual bool HasTransparentBackground() { return true; }
// implementation only: this is used by wxStaticBoxSizer to account for the // implementation only: this is used by wxStaticBoxSizer to account for the