moved button handler into the modeless dialog itself - at least like this it works

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-08-20 23:01:17 +00:00
parent 68eb5f6337
commit 5d987909a8
2 changed files with 9 additions and 10 deletions

View File

@@ -91,8 +91,6 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_FIND_CLOSE(-1, MyFrame::OnFindDialog)
#endif // wxUSE_FINDREPLDLG
EVT_MENU(wxID_EXIT, MyFrame::OnExit)
EVT_BUTTON(DIALOGS_MODELESS_BTN, MyFrame::OnButton)
END_EVENT_TABLE()
BEGIN_EVENT_TABLE(MyModalDialog, wxDialog)
@@ -100,6 +98,8 @@ BEGIN_EVENT_TABLE(MyModalDialog, wxDialog)
END_EVENT_TABLE()
BEGIN_EVENT_TABLE(MyModelessDialog, wxDialog)
EVT_BUTTON(DIALOGS_MODELESS_BTN, MyModelessDialog::OnButton)
EVT_CLOSE(MyModelessDialog::OnClose)
END_EVENT_TABLE()
@@ -548,12 +548,6 @@ void MyFrame::ModelessDlg(wxCommandEvent& event)
}
}
void MyFrame::OnButton(wxCommandEvent& WXUNUSED(event))
{
wxMessageBox("Button pressed in modeless dialog", "Info",
wxOK | wxICON_INFORMATION, this);
}
void MyFrame::ShowTip(wxCommandEvent& event)
{
#if wxUSE_STARTUP_TIPS
@@ -742,6 +736,12 @@ MyModelessDialog::MyModelessDialog(wxWindow *parent)
sizerTop->Fit(this);
}
void MyModelessDialog::OnButton(wxCommandEvent& WXUNUSED(event))
{
wxMessageBox("Button pressed in modeless dialog", "Info",
wxOK | wxICON_INFORMATION, this);
}
void MyModelessDialog::OnClose(wxCloseEvent& event)
{
if ( event.CanVeto() )