X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7ecc7eb6befabc80362afe9b98a494688576fcaf..d2e66707deb10dea6f92e3e4092f8a43ef942a5d:/src/generic/srchctlg.cpp diff --git a/src/generic/srchctlg.cpp b/src/generic/srchctlg.cpp index e202bfe62e..d0efcd17b3 100644 --- a/src/generic/srchctlg.cpp +++ b/src/generic/srchctlg.cpp @@ -143,6 +143,13 @@ public: void SetBitmapLabel(const wxBitmap& label) { m_bmp = label; } + // The buttons in wxSearchCtrl shouldn't accept focus from keyboard because + // this would interfere with the usual TAB processing: the user expects + // that pressing TAB in the search control should switch focus to the next + // control and not give it to the button inside the same control. Besides, + // the search button can be already activated by pressing "Enter" so there + // is really no reason for it to be able to get focus from keyboard. + virtual bool AcceptsFocusFromKeyboard() const { return false; } protected: wxSize DoGetBestSize() const