From c6e445d40c8f9a58ff728e31c72caa37045660c3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 18 Jan 2018 22:58:34 +0100 Subject: [PATCH] Set focus to wxSimplebook contents when setting focus to it This is more expected than simply doing nothing, as happened until now. --- include/wx/simplebook.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/wx/simplebook.h b/include/wx/simplebook.h index 4d604bac8e..7e819700fc 100644 --- a/include/wx/simplebook.h +++ b/include/wx/simplebook.h @@ -146,6 +146,14 @@ public: return NO_IMAGE; } + // Override some wxWindow methods too. + virtual void SetFocus() wxOVERRIDE + { + wxWindow* const page = GetCurrentPage(); + if ( page ) + page->SetFocus(); + } + protected: virtual void UpdateSelectedPage(size_t newsel) wxOVERRIDE {