This was broken by r72581, add event.Skip() call to the handler for this event
added there.
Also add a handler for this event to the corresponding page of the widgets
sample to be able to test this.
Closes #14799.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72915
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void OnToggleSearchMenu(wxCommandEvent&);
void OnSearch(wxCommandEvent& event);
void OnToggleSearchMenu(wxCommandEvent&);
void OnSearch(wxCommandEvent& event);
+ void OnSearchCancel(wxCommandEvent& event);
wxMenu* CreateTestMenu();
wxMenu* CreateTestMenu();
EVT_CHECKBOX(ID_MENU_CB, SearchCtrlWidgetsPage::OnToggleSearchMenu)
EVT_SEARCHCTRL_SEARCH_BTN(wxID_ANY, SearchCtrlWidgetsPage::OnSearch)
EVT_CHECKBOX(ID_MENU_CB, SearchCtrlWidgetsPage::OnToggleSearchMenu)
EVT_SEARCHCTRL_SEARCH_BTN(wxID_ANY, SearchCtrlWidgetsPage::OnSearch)
+ EVT_SEARCHCTRL_CANCEL_BTN(wxID_ANY, SearchCtrlWidgetsPage::OnSearchCancel)
END_EVENT_TABLE()
// ============================================================================
END_EVENT_TABLE()
// ============================================================================
wxLogMessage("Search button: search for \"%s\".", event.GetString());
}
wxLogMessage("Search button: search for \"%s\".", event.GetString());
}
+void SearchCtrlWidgetsPage::OnSearchCancel(wxCommandEvent& event)
+{
+ wxLogMessage("Cancel button pressed.");
+
+ event.Skip();
+}
+
#endif // wxUSE_SEARCHCTRL
#endif // wxUSE_SEARCHCTRL
-void wxSearchCtrl::OnCancelButton( wxCommandEvent& WXUNUSED(event) )
+void wxSearchCtrl::OnCancelButton( wxCommandEvent& event )
}
void wxSearchCtrl::OnSetFocus( wxFocusEvent& /*event*/ )
}
void wxSearchCtrl::OnSetFocus( wxFocusEvent& /*event*/ )