Filter index wasn't being set for multiple file dialog

Added several filters to multiple files test in dialogs sample
to test that it's now working


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2004-01-21 13:41:12 +00:00
parent c10ae51018
commit f0f4301209
2 changed files with 10 additions and 1 deletions

View File

@@ -518,8 +518,14 @@ void MyFrame::FileOpen2(wxCommandEvent& WXUNUSED(event) )
void MyFrame::FilesOpen(wxCommandEvent& WXUNUSED(event) )
{
wxString wildcards =
#ifdef __WXMOTIF__
_T("C++ files (*.cpp)|*.cpp");
#else
_T("All files (*.*)|*.*|C++ files (*.h;*.cpp)|*.h;*.cpp");
#endif
wxFileDialog dialog(this, _T("Testing open multiple file dialog"),
_T(""), _T(""), wxFileSelectorDefaultWildcardStr,
_T(""), _T(""), wildcards,
wxMULTIPLE);
if (dialog.ShowModal() == wxID_OK)
@@ -538,6 +544,8 @@ void MyFrame::FilesOpen(wxCommandEvent& WXUNUSED(event) )
msg += s;
}
s.Printf(_T("Filter index: %d"), dialog.GetFilterIndex());
msg += s;
wxMessageDialog dialog2(this, msg, _T("Selected files"));
dialog2.ShowModal();