test centering file dialog on parent frame

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2006-04-21 13:10:51 +00:00
parent cb80db46e5
commit cd7afaff0c

View File

@ -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();
}