From: Vadim Zeitlin Date: Fri, 4 May 2012 22:20:55 +0000 (+0000) Subject: Derive wxGenericFileCtrl from wxControl. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5804d539bea1e01b3eef05e4cd3f46de5d5fb6a9 Derive wxGenericFileCtrl from wxControl. wxFileCtrl -- which can be #define'd as wxGenericFileCtrl -- is documented to inherit from wxControl and does derive from it in the native GTK version, so do it for the generic version too. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/generic/filectrlg.h b/include/wx/generic/filectrlg.h index c1af5c2631..9bcc5d08d6 100644 --- a/include/wx/generic/filectrlg.h +++ b/include/wx/generic/filectrlg.h @@ -14,7 +14,7 @@ #if wxUSE_FILECTRL -#include "wx/panel.h" +#include "wx/containr.h" #include "wx/listctrl.h" #include "wx/filectrl.h" #include "wx/filename.h" @@ -182,7 +182,7 @@ private: DECLARE_EVENT_TABLE() }; -class WXDLLIMPEXP_CORE wxGenericFileCtrl : public wxPanel, +class WXDLLIMPEXP_CORE wxGenericFileCtrl : public wxNavigationEnabled, public wxFileCtrlBase { public: diff --git a/src/generic/filectrlg.cpp b/src/generic/filectrlg.cpp index de9e1144aa..87c3fc7866 100644 --- a/src/generic/filectrlg.cpp +++ b/src/generic/filectrlg.cpp @@ -883,9 +883,9 @@ wxFileListCtrl::~wxFileListCtrl() // wxGenericFileCtrl implementation /////////////////////////////////////////////////////////////////////////////// -IMPLEMENT_DYNAMIC_CLASS( wxGenericFileCtrl, wxPanel ) +IMPLEMENT_DYNAMIC_CLASS( wxGenericFileCtrl, wxNavigationEnabled ) -BEGIN_EVENT_TABLE( wxGenericFileCtrl, wxPanel ) +BEGIN_EVENT_TABLE( wxGenericFileCtrl, wxNavigationEnabled ) EVT_LIST_ITEM_SELECTED( ID_FILELIST_CTRL, wxGenericFileCtrl::OnSelected ) EVT_LIST_ITEM_ACTIVATED( ID_FILELIST_CTRL, wxGenericFileCtrl::OnActivated ) EVT_CHOICE( ID_CHOICE, wxGenericFileCtrl::OnChoiceFilter ) @@ -916,7 +916,11 @@ bool wxGenericFileCtrl::Create( wxWindow *parent, wxASSERT_MSG( !( ( m_style & wxFC_SAVE ) && ( m_style & wxFC_MULTIPLE ) ), wxT( "wxFC_MULTIPLE can't be used with wxFC_SAVE" ) ); - wxPanel::Create( parent, id, pos, size, wxTAB_TRAVERSAL, name ); + wxNavigationEnabled::Create( parent, id, + pos, size, + wxTAB_TRAVERSAL, + wxDefaultValidator, + name ); m_dir = defaultDirectory;