From: Vadim Zeitlin Date: Thu, 7 May 2009 17:01:59 +0000 (+0000) Subject: add SetEscapeId() test (see #10746) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5a58a1342de433f0a56e3c75e97a29c1a2e4ec80?ds=sidebyside add SetEscapeId() test (see #10746) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp index f9dbb0a3cc..d9cd57f079 100644 --- a/samples/dialogs/dialogs.cpp +++ b/samples/dialogs/dialogs.cpp @@ -1998,14 +1998,15 @@ MyModalDialog::MyModalDialog(wxWindow *parent) m_btnModeless = new wxButton(this, wxID_ANY, _T("Mode&less dialog")); m_btnDelete = new wxButton(this, wxID_ANY, _T("&Delete button")); - wxButton *btnOk = new wxButton(this, wxID_CANCEL, _T("&Close")); sizerTop->Add(m_btnModal, 0, wxALIGN_CENTER | wxALL, 5); sizerTop->Add(m_btnModeless, 0, wxALIGN_CENTER | wxALL, 5); sizerTop->Add(m_btnDelete, 0, wxALIGN_CENTER | wxALL, 5); - sizerTop->Add(btnOk, 0, wxALIGN_CENTER | wxALL, 5); + sizerTop->Add(new wxButton(this, wxID_CLOSE), 0, wxALIGN_CENTER | wxALL, 5); SetSizerAndFit(sizerTop); + SetEscapeId(wxID_CLOSE); + m_btnModal->SetFocus(); m_btnModal->SetDefault(); }