Allow using windows that can't be focused with wxNavigationEnabled<>.
The code in wxNavigationEnabled<> assumed that the window itself could be focused if it didn't have any focusable children because it was originally extracted from wxPanel that can, indeed, be focused. This is however not the case for all windows, notably not for wxStaticBox which now derives from wxNavigationEnabled as well but can never be focused itself. Add wxControlContainer::DisableSelfFocus() and call it from wxStaticBox to support this situation. This required splitting m_acceptsFocus flag into m_acceptsFocusSelf and m_acceptsFocusChildren and updating various methods using them. See #13271. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -28,7 +28,7 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBoxNameStr[];
|
||||
class WXDLLIMPEXP_CORE wxStaticBoxBase : public wxNavigationEnabled<wxControl>
|
||||
{
|
||||
public:
|
||||
wxStaticBoxBase() { }
|
||||
wxStaticBoxBase() { m_container.DisableSelfFocus(); }
|
||||
|
||||
// overridden base class virtuals
|
||||
virtual bool HasTransparentBackground() { return true; }
|
||||
|
Reference in New Issue
Block a user