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