Set the string to search for in wxSearchCtrl events.

It's more convenient to have the string to search for directly in the event
object than to retrieve it from wxSearchCtrl itself as it had to be done
before.

Closes #4665.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-07-11 10:44:18 +00:00
parent 68abd97d19
commit ac63bc407e
4 changed files with 25 additions and 1 deletions

View File

@@ -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);
}