]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/wxFileDialog.py
added wxLog::ClearTraceMasks()
[wxWidgets.git] / wxPython / demo / wxFileDialog.py
CommitLineData
cf694132
RD
1
2from wxPython.wx import *
3
4#---------------------------------------------------------------------------
5
6def runTest(frame, nb, log):
f6bcfd97 7 dlg = wxFileDialog(frame, "Choose a file", ".", "", "*.*", wxOPEN|wxMULTIPLE)
cf694132 8 if dlg.ShowModal() == wxID_OK:
f6bcfd97
BP
9 for path in dlg.GetPaths():
10 log.WriteText('You selected: %s\n' % path)
cf694132
RD
11 dlg.Destroy()
12
13#---------------------------------------------------------------------------
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28overview = """\
29This class represents the file chooser dialog.
30
31wxFileDialog()
32----------------------------
33
34wxFileDialog(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)
36
37Constructor. Use wxFileDialog::ShowModal to show the dialog.
38
39Parameters
40-------------------
41
42parent = Parent window.
43
44message = Message to show on the dialog.
45
46defaultDir = The default directory, or the empty string.
47
48defaultFile = The default filename, or the empty string.
49
50wildcard = A wildcard, such as "*.*".
51
52style = A dialog style. A bitlist of:
53
54wxOPEN This is an open dialog (Windows only).
55
56wxSAVE This is a save dialog (Windows only).
57
58wxHIDE_READONLY Hide read-only files (Windows only).
59
60wxOVERWRITE_PROMPT Prompt for a conformation if a file will be overridden (Windows only).
61
62pos = Dialog position.
63"""