Test focus event generation for all pages of the widgets sample
Previously this was done only for wxSearchCtrl, extend this now to all the widgets in order to be able to check whether the expected events are generated.
This commit is contained in:
@@ -88,9 +88,6 @@ protected:
|
||||
void OnSearch(wxCommandEvent& event);
|
||||
void OnSearchCancel(wxCommandEvent& event);
|
||||
|
||||
void OnSetFocus(wxFocusEvent& event);
|
||||
void OnKillFocus(wxFocusEvent& event);
|
||||
|
||||
wxMenu* CreateTestMenu();
|
||||
|
||||
// (re)create the control
|
||||
@@ -179,9 +176,6 @@ void SearchCtrlWidgetsPage::CreateControl()
|
||||
|
||||
m_srchCtrl = new wxSearchCtrl(this, -1, wxEmptyString, wxDefaultPosition,
|
||||
FromDIP(wxSize(150, -1)), style);
|
||||
|
||||
m_srchCtrl->Bind(wxEVT_SET_FOCUS, &SearchCtrlWidgetsPage::OnSetFocus, this);
|
||||
m_srchCtrl->Bind(wxEVT_KILL_FOCUS, &SearchCtrlWidgetsPage::OnKillFocus, this);
|
||||
}
|
||||
|
||||
void SearchCtrlWidgetsPage::RecreateWidget()
|
||||
@@ -256,18 +250,4 @@ void SearchCtrlWidgetsPage::OnSearchCancel(wxCommandEvent& event)
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void SearchCtrlWidgetsPage::OnSetFocus(wxFocusEvent& event)
|
||||
{
|
||||
wxLogMessage("Search control got focus");
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void SearchCtrlWidgetsPage::OnKillFocus(wxFocusEvent& event)
|
||||
{
|
||||
wxLogMessage("Search control lost focus");
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
#endif // wxUSE_SEARCHCTRL
|
||||
|
Reference in New Issue
Block a user