]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/DirDialog.py
1 # 11/17/2003 - Jeff Grimmett (grimmtooth@softhome.net)
3 # o Updated for wx namespace
8 #---------------------------------------------------------------------------
10 def runTest(frame
, nb
, log
):
12 # In this case we include a "New directory" button.
13 dlg
= wx
.DirDialog(frame
, "Choose a directory:",
14 style
=wx
.DD_DEFAULT_STYLE|wx
.DD_NEW_DIR_BUTTON
)
16 # If the user selects OK, then we process the dialog's data.
17 # This is done by getting the path data from the dialog - BEFORE
19 if dlg
.ShowModal() == wx
.ID_OK
:
20 log
.WriteText('You selected: %s\n' % dlg
.GetPath())
22 # Only destroy a dialog after you're done with it.
25 #---------------------------------------------------------------------------
30 This class represents the directory chooser dialog. It is used when all you
31 need from the user is the name of a directory. Data is retrieved via utility
32 methods; see the <code>DirDialog</code> documentation for specifics.
36 if __name__
== '__main__':
39 run
.main(['', os
.path
.basename(sys
.argv
[0])])