From cd7afaff0c7328d344f0d61d3c00241986ab140d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 21 Apr 2006 13:10:51 +0000 Subject: [PATCH] test centering file dialog on parent frame git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/dialogs/dialogs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp index c6fd7e18fc..13a84b1546 100644 --- a/samples/dialogs/dialogs.cpp +++ b/samples/dialogs/dialogs.cpp @@ -696,8 +696,8 @@ void MyFrame::FileOpen(wxCommandEvent& WXUNUSED(event) ) #endif ); - dialog.SetDirectory(wxGetHomeDir()); dialog.CentreOnParent(); + dialog.SetDirectory(wxGetHomeDir()); if (dialog.ShowModal() == wxID_OK) { @@ -968,7 +968,7 @@ void MyFrame::DlgCenteredScreen(wxCommandEvent& WXUNUSED(event)) { wxDialog dlg(this, wxID_ANY, _T("Dialog centered on screen"), wxDefaultPosition, wxSize(200, 100)); - new wxButton(&dlg, wxID_OK, _T("Close"), wxPoint(10, 10)); + (new wxButton(&dlg, wxID_OK, _T("Close")))->Centre(); dlg.CentreOnScreen(); dlg.ShowModal(); } @@ -977,7 +977,7 @@ void MyFrame::DlgCenteredParent(wxCommandEvent& WXUNUSED(event)) { wxDialog dlg(this, wxID_ANY, _T("Dialog centered on parent"), wxDefaultPosition, wxSize(200, 100)); - new wxButton(&dlg, wxID_OK, _T("Close"), wxPoint(10, 10)); + (new wxButton(&dlg, wxID_OK, _T("Close")))->Centre(); dlg.CentreOnParent(); dlg.ShowModal(); }