X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/57b2bba406d9fd2464220281b1313652b883af89..160f78e09db9fff2f7c3a1484514835f1d83eb8e:/samples/popup/popup.cpp?ds=inline diff --git a/samples/popup/popup.cpp b/samples/popup/popup.cpp index e48e765b20..2cbf41b01c 100644 --- a/samples/popup/popup.cpp +++ b/samples/popup/popup.cpp @@ -154,7 +154,7 @@ SimpleTransientPopup::~SimpleTransientPopup() void SimpleTransientPopup::Popup(wxWindow *focus) { wxLogMessage( wxT("0x%lx SimpleTransientPopup::Popup"), long(this) ); - wxPopupTransientWindow::Popup(focus ? focus : m_panel); + wxPopupTransientWindow::Popup(); } void SimpleTransientPopup::OnDismiss() @@ -263,6 +263,7 @@ public: void OnTestDialog(wxCommandEvent& event); void OnStartSimplePopup(wxCommandEvent& event); void OnStartScrolledPopup(wxCommandEvent& event); + void OnActivate(wxActivateEvent& event); private: SimpleTransientPopup *m_simplePopup; @@ -314,6 +315,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(Minimal_Quit, MyFrame::OnQuit) EVT_MENU(Minimal_About, MyFrame::OnAbout) EVT_MENU(Minimal_TestDialog, MyFrame::OnTestDialog) + EVT_ACTIVATE(MyFrame::OnActivate) EVT_BUTTON(Minimal_StartSimplePopup, MyFrame::OnStartSimplePopup) EVT_BUTTON(Minimal_StartScrolledPopup, MyFrame::OnStartScrolledPopup) END_EVENT_TABLE() @@ -378,6 +380,11 @@ MyFrame::~MyFrame() // event handlers +void MyFrame::OnActivate(wxActivateEvent& event) +{ + wxLogMessage( wxT("In activate...") ); +} + void MyFrame::OnStartSimplePopup(wxCommandEvent& event) { wxLogMessage( wxT("================================================") );