Use wxNavigationEnabled<> for keyboard navigation in generic wxSearchCtrl.

Derive generic wxSearchCtrl implementation from wxNavigationEnabled<> to
ensure that TAB navigation works correctly in it. While it did work before for
search controls without wxTE_PROCESS_ENTER style (because this wasn't handled
by this control itself at all in fact), it stopped working as soon as this
style was used in wxMSW because then the navigation was implemented by
manually calling wxWindow::Navigate() and this requires wxControlContainer
support.

Use wxNavigationEnabled<> to easily add it to wxSearchCtrl.

See #12808.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-07-24 22:19:23 +00:00
parent 4d98817cfa
commit e7c9d913c0

View File

@@ -26,8 +26,11 @@
// no native version, use the generic one
#define wxUSE_NATIVE_SEARCH_CONTROL 0
class WXDLLIMPEXP_CORE wxSearchCtrlBaseBaseClass : public wxControl,
public wxTextCtrlIface
#include "wx/containr.h"
class WXDLLIMPEXP_CORE wxSearchCtrlBaseBaseClass
: public wxNavigationEnabled<wxControl>,
public wxTextCtrlIface
{
};
#endif