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
void MyFrame::FilesOpen(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"),
wxFileDialog dialog(this, _T("Testing open multiple file dialog"),
- _T(""), _T(""), wxFileSelectorDefaultWildcardStr,
+ _T(""), _T(""), wildcards,
wxMULTIPLE);
if (dialog.ShowModal() == wxID_OK)
wxMULTIPLE);
if (dialog.ShowModal() == wxID_OK)
+ s.Printf(_T("Filter index: %d"), dialog.GetFilterIndex());
+ msg += s;
wxMessageDialog dialog2(this, msg, _T("Selected files"));
dialog2.ShowModal();
wxMessageDialog dialog2(this, msg, _T("Selected files"));
dialog2.ShowModal();
dir += _T('\\');
m_path = dir + m_fileName;
dir += _T('\\');
m_path = dir + m_fileName;
+ m_filterIndex = (int)of.nFilterIndex - 1;