]> git.saurik.com Git - wxWidgets.git/commitdiff
Use wxNavigationEnabled<> for keyboard navigation in generic wxSearchCtrl.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 24 Jul 2011 22:19:23 +0000 (22:19 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 24 Jul 2011 22:19:23 +0000 (22:19 +0000)
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

include/wx/srchctrl.h

index 2a1c0ba412c79ded28e56d2d41f1a5432d896aeb..74a60c303dab32b94c2f985cf545231493d58435 100644 (file)
     // 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