X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..59d04dff037f66e9e73b389de72835211f5f0bcd:/wxPython/demo/wxFileDialog.py diff --git a/wxPython/demo/wxFileDialog.py b/wxPython/demo/wxFileDialog.py index 476efcf8bd..a3c753e45b 100644 --- a/wxPython/demo/wxFileDialog.py +++ b/wxPython/demo/wxFileDialog.py @@ -1,10 +1,15 @@ from wxPython.wx import * +import string #--------------------------------------------------------------------------- +wildcard = "Python source (*.py)|*.py|" \ + "Compiled Python (*.pyc)|*.pyc|" \ + "All files (*.*)|*.*" + def runTest(frame, nb, log): - dlg = wxFileDialog(frame, "Choose a file", ".", "", "*.*", wxOPEN|wxMULTIPLE) + dlg = wxFileDialog(frame, "Choose a file", "", "", wildcard, wxOPEN|wxMULTIPLE) if dlg.ShowModal() == wxID_OK: for path in dlg.GetPaths(): log.WriteText('You selected: %s\n' % path) @@ -28,36 +33,4 @@ def runTest(frame, nb, log): overview = """\ This class represents the file chooser dialog. -wxFileDialog() ----------------------------- - -wxFileDialog(wxWindow* parent, const wxString& message = "Choose a file", const wxString& defaultDir = "" -, const wxString& defaultFile = "", const wxString& wildcard = "*.*", long style = 0, const wxPoint& pos = wxDefaultPosition) - -Constructor. Use wxFileDialog::ShowModal to show the dialog. - -Parameters -------------------- - -parent = Parent window. - -message = Message to show on the dialog. - -defaultDir = The default directory, or the empty string. - -defaultFile = The default filename, or the empty string. - -wildcard = A wildcard, such as "*.*". - -style = A dialog style. A bitlist of: - -wxOPEN This is an open dialog (Windows only). - -wxSAVE This is a save dialog (Windows only). - -wxHIDE_READONLY Hide read-only files (Windows only). - -wxOVERWRITE_PROMPT Prompt for a conformation if a file will be overridden (Windows only). - -pos = Dialog position. """