]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxFileDialog.py
digital mars updated
[wxWidgets.git] / wxPython / demo / wxFileDialog.py
1
2 from wxPython.wx import *
3
4 #---------------------------------------------------------------------------
5
6 wildcard = "Python source (*.py)|*.py|" \
7 "Compiled Python (*.pyc)|*.pyc|" \
8 "All files (*.*)|*.*"
9
10 def runTest(frame, nb, log):
11 dlg = wxFileDialog(frame, "Choose a file", "", "", wildcard, wxOPEN|wxMULTIPLE)
12 if dlg.ShowModal() == wxID_OK:
13 paths = dlg.GetPaths()
14 log.WriteText('You selected %d files:' % len(paths))
15 for path in paths:
16 log.WriteText(' %s\n' % path)
17 dlg.Destroy()
18
19 #---------------------------------------------------------------------------
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 overview = """\
35 This class represents the file chooser dialog.
36
37 """