added wxFileDialog::SetfilterIndex() test

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-09-23 14:54:50 +00:00
parent 27579129e9
commit 07b3c46cb6

View File

@@ -534,16 +534,16 @@ void MyFrame::FileSave(wxCommandEvent& WXUNUSED(event) )
wxFileDialog dialog(this,
_T("Testing save file dialog"),
_T(""),
_T("myletter.txt"),
_T("myletter.doc"),
_T("Text files (*.txt)|*.txt|Document files (*.doc)|*.doc"),
wxSAVE|wxOVERWRITE_PROMPT);
dialog.SetFilterIndex(1);
if (dialog.ShowModal() == wxID_OK)
{
wxChar buf[400];
wxSprintf(buf, _T("%s, filter %d"), (const wxChar*)dialog.GetPath(), dialog.GetFilterIndex());
wxMessageDialog dialog2(this, wxString(buf), _T("Selected path"));
dialog2.ShowModal();
wxLogMessage(_T("%s, filter %d"),
dialog.GetPath().c_str(), dialog.GetFilterIndex());
}
}
@@ -557,8 +557,7 @@ void MyFrame::DirChoose(wxCommandEvent& WXUNUSED(event) )
if (dialog.ShowModal() == wxID_OK)
{
wxMessageDialog dialog2(this, dialog.GetPath(), _T("Selected path"));
dialog2.ShowModal();
wxLogMessage(_T("Selected path: %s"), dialog.GetPath().c_str());
}
}