diff --git a/include/wx/generic/combo.h b/include/wx/generic/combo.h index 92b3ff624e..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 // ---------------------------------------------------------------------------- @@ -30,15 +32,14 @@ #endif -#include "wx/dcbuffer.h" - 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, @@ -48,7 +49,6 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxComboBoxNameStr) - : wxComboCtrlBase() { Init(); @@ -96,19 +96,7 @@ protected: #endif // For better transparent background rendering - virtual bool HasTransparentBackground() wxOVERRIDE - { - #if wxALWAYS_NATIVE_DOUBLE_BUFFER - #ifdef __WXGTK__ - // Sanity check for GTK+ - return IsDoubleBuffered(); - #else - return true; - #endif - #else - return false; - #endif - } + virtual bool HasTransparentBackground() wxOVERRIDE; // Mandatory virtuals virtual void OnResize() wxOVERRIDE; diff --git a/include/wx/generic/datectrl.h b/include/wx/generic/datectrl.h index 61a4ad18c9..09d340739d 100644 --- a/include/wx/generic/datectrl.h +++ b/include/wx/generic/datectrl.h @@ -12,6 +12,7 @@ #define _WX_GENERIC_DATECTRL_H_ #include "wx/compositewin.h" +#include "wx/containr.h" class WXDLLIMPEXP_FWD_CORE wxComboCtrl; @@ -19,7 +20,7 @@ class WXDLLIMPEXP_FWD_ADV wxCalendarCtrl; class WXDLLIMPEXP_FWD_ADV wxCalendarComboPopup; class WXDLLIMPEXP_ADV wxDatePickerCtrlGeneric - : public wxCompositeWindow + : public wxCompositeWindowSettersOnly< wxNavigationEnabled > { public: // creating the control diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index 33342b6952..3dc6901f82 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -751,9 +751,7 @@ void wxComboBoxExtraInputHandler::OnKey(wxKeyEvent& event) if ( !combo->GetEventHandler()->ProcessEvent(redirectedEvent) ) { - // Don't let TAB through to the text ctrl - looks ugly - if ( event.GetKeyCode() != WXK_TAB ) - event.Skip(); + event.Skip(); } } diff --git a/src/generic/combog.cpp b/src/generic/combog.cpp index 1bac5e630e..411dc2e782 100644 --- a/src/generic/combog.cpp +++ b/src/generic/combog.cpp @@ -198,6 +198,20 @@ wxGenericComboCtrl::~wxGenericComboCtrl() { } +bool wxGenericComboCtrl::HasTransparentBackground() +{ +#if wxALWAYS_NATIVE_DOUBLE_BUFFER + #ifdef __WXGTK__ + // Sanity check for GTK+ + return IsDoubleBuffered(); + #else + return true; + #endif +#else + return false; +#endif +} + void wxGenericComboCtrl::OnResize() {