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:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user