]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/demo/wxFileDialog.py
2 from wxPython
.wx
import *
4 #---------------------------------------------------------------------------
6 def 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())
12 #---------------------------------------------------------------------------
28 This class represents the file chooser dialog.
31 ----------------------------
33 wxFileDialog(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)
36 Constructor. Use wxFileDialog::ShowModal to show the dialog.
41 parent = Parent window.
43 message = Message to show on the dialog.
45 defaultDir = The default directory, or the empty string.
47 defaultFile = The default filename, or the empty string.
49 wildcard = A wildcard, such as "*.*".
51 style = A dialog style. A bitlist of:
53 wxOPEN This is an open dialog (Windows only).
55 wxSAVE This is a save dialog (Windows only).
57 wxHIDE_READONLY Hide read-only files (Windows only).
59 wxOVERWRITE_PROMPT Prompt for a conformation if a file will be overridden (Windows only).
61 pos = Dialog position.