From 27cad5e04d4de436c1ebf0aa167e1502040fb502 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 30 Jan 2018 19:50:09 +0100 Subject: [PATCH] Fix TAB navigation with wxComboCtrl in non-MSW ports Derive wxGenericComboCtrl from wxNavigationEnabled<> to make TAB work correctly when the focus was on it, otherwise it didn't move it correctly to the next control. This notably allows TAB to cycle through all the controls in the "combo" sample whereas previously it stopped on reaching the combo control with the list popup with wxGTK. --- include/wx/generic/combo.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/wx/generic/combo.h b/include/wx/generic/combo.h index dc9155394f..9c5da101d0 100644 --- a/include/wx/generic/combo.h +++ b/include/wx/generic/combo.h @@ -16,6 +16,8 @@ // Only define generic if native doesn't have all the features #if !defined(wxCOMBOCONTROL_FULLY_FEATURED) +#include "wx/containr.h" + // ---------------------------------------------------------------------------- // Generic wxComboCtrl // ---------------------------------------------------------------------------- @@ -32,11 +34,12 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxComboBoxNameStr[]; -class WXDLLIMPEXP_CORE wxGenericComboCtrl : public wxComboCtrlBase +class WXDLLIMPEXP_CORE wxGenericComboCtrl + : public wxNavigationEnabled { public: // ctors and such - wxGenericComboCtrl() : wxComboCtrlBase() { Init(); } + wxGenericComboCtrl() { Init(); } wxGenericComboCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, @@ -46,7 +49,6 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxComboBoxNameStr) - : wxComboCtrlBase() { Init();