]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/demo/DirDialog.py
Call event.Skip in OnSize
[wxWidgets.git] / wxPython / demo / DirDialog.py
... / ...
CommitLineData
1
2import wx
3
4#---------------------------------------------------------------------------
5
6def runTest(frame, nb, log):
7
8 # In this case we include a "New directory" button.
9 dlg = wx.DirDialog(frame, "Choose a directory:",
10 style=wx.DD_DEFAULT_STYLE|wx.DD_NEW_DIR_BUTTON)
11
12 # If the user selects OK, then we process the dialog's data.
13 # This is done by getting the path data from the dialog - BEFORE
14 # we destroy it.
15 if dlg.ShowModal() == wx.ID_OK:
16 log.WriteText('You selected: %s\n' % dlg.GetPath())
17
18 # Only destroy a dialog after you're done with it.
19 dlg.Destroy()
20
21#---------------------------------------------------------------------------
22
23
24
25overview = """\
26This class represents the directory chooser dialog. It is used when all you
27need from the user is the name of a directory. Data is retrieved via utility
28methods; see the <code>DirDialog</code> documentation for specifics.
29"""
30
31
32if __name__ == '__main__':
33 import sys,os
34 import run
35 run.main(['', os.path.basename(sys.argv[0])])
36