X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..571d991bb3232f0dcd3319dbdc9d35e5c80f4c71:/src/osx/srchctrl_osx.cpp diff --git a/src/osx/srchctrl_osx.cpp b/src/osx/srchctrl_osx.cpp index 7881f00e34..d9ec1194f9 100644 --- a/src/osx/srchctrl_osx.cpp +++ b/src/osx/srchctrl_osx.cpp @@ -5,7 +5,7 @@ // Created: 2006-02-19 // RCS-ID: $Id: srchctrl.cpp 54820 2008-07-29 20:04:11Z SC $ // Copyright: Vince Harron -// License: wxWindows licence +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx.h". @@ -205,6 +205,11 @@ bool wxSearchCtrl::HandleSearchFieldSearchHit() { wxCommandEvent event(wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, m_windowId ); event.SetEventObject(this); + + // provide the string to search for directly in the event, this is more + // convenient than retrieving it from the control in event handler code + event.SetString(GetValue()); + return ProcessCommand(event); }