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.
This commit is contained in:
@@ -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<wxComboCtrlBase>
|
||||
{
|
||||
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();
|
||||
|
||||
|
Reference in New Issue
Block a user