X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e181c7a2c32193fc8138cc32ed07984eadd4a21..4a21ea9d9eec67383ffba7c86f7c413ddee28114:/src/osx/srchctrl_osx.cpp?ds=sidebyside diff --git a/src/osx/srchctrl_osx.cpp b/src/osx/srchctrl_osx.cpp index d264955f00..58cc5313ec 100644 --- a/src/osx/srchctrl_osx.cpp +++ b/src/osx/srchctrl_osx.cpp @@ -3,9 +3,9 @@ // Purpose: implements mac carbon wxSearchCtrl // Author: Vince Harron // Created: 2006-02-19 -// RCS-ID: $Id: srchctrl.cpp 54820 2008-07-29 20:04:11Z SC $ +// RCS-ID: $Id$ // Copyright: Vince Harron -// License: wxWindows licence +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx.h". @@ -70,7 +70,7 @@ wxSearchWidgetImpl* wxSearchCtrl::GetSearchPeer() const { return dynamic_cast (m_peer); } - + wxSearchCtrl::~wxSearchCtrl() { delete m_menu; @@ -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); }