]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxFileDialog.py
2 from wxPython
.wx
import *
4 #---------------------------------------------------------------------------
6 def runTest(frame
, nb
, log
):
7 dlg
= wxFileDialog(frame
, "Choose a file", ".", "", "*.*", wxOPEN|wxMULTIPLE
)
8 if dlg
.ShowModal() == wxID_OK
:
9 for path
in dlg
.GetPaths():
10 log
.WriteText('You selected: %s\n' % path
)
13 #---------------------------------------------------------------------------
29 This class represents the file chooser dialog.
32 ----------------------------
34 wxFileDialog(wxWindow* parent, const wxString& message = "Choose a file", const wxString& defaultDir = ""
35 , const wxString& defaultFile = "", const wxString& wildcard = "*.*", long style = 0, const wxPoint& pos = wxDefaultPosition)
37 Constructor. Use wxFileDialog::ShowModal to show the dialog.
42 parent = Parent window.
44 message = Message to show on the dialog.
46 defaultDir = The default directory, or the empty string.
48 defaultFile = The default filename, or the empty string.
50 wildcard = A wildcard, such as "*.*".
52 style = A dialog style. A bitlist of:
54 wxOPEN This is an open dialog (Windows only).
56 wxSAVE This is a save dialog (Windows only).
58 wxHIDE_READONLY Hide read-only files (Windows only).
60 wxOVERWRITE_PROMPT Prompt for a conformation if a file will be overridden (Windows only).
62 pos = Dialog position.