X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ca298c88524c5c44c38d71af0c1f8ab81543e6a9..cf694132f1c28509a9f84377ce8d374bae4177ad:/utils/wxPython/demo/wxFileDialog.py diff --git a/utils/wxPython/demo/wxFileDialog.py b/utils/wxPython/demo/wxFileDialog.py new file mode 100644 index 0000000000..0287f4ccd5 --- /dev/null +++ b/utils/wxPython/demo/wxFileDialog.py @@ -0,0 +1,62 @@ + +from wxPython.wx import * + +#--------------------------------------------------------------------------- + +def runTest(frame, nb, log): + dlg = wxFileDialog(frame, "Choose a file", ".", "", "*.*", wxOPEN) + if dlg.ShowModal() == wxID_OK: + log.WriteText('You selected: %s\n' % dlg.GetPath()) + dlg.Destroy() + +#--------------------------------------------------------------------------- + + + + + + + + + + + + + + +overview = """\ +This class represents the file chooser dialog. + +wxFileDialog() +---------------------------- + +wxFileDialog(wxWindow* parent, const wxString& message = "Choose a file", const wxString& defaultDir = "" +, const wxString& defaultFile = "", const wxString& wildcard = "*.*", long style = 0, const wxPoint& pos = wxDefaultPosition) + +Constructor. Use wxFileDialog::ShowModal to show the dialog. + +Parameters +------------------- + +parent = Parent window. + +message = Message to show on the dialog. + +defaultDir = The default directory, or the empty string. + +defaultFile = The default filename, or the empty string. + +wildcard = A wildcard, such as "*.*". + +style = A dialog style. A bitlist of: + +wxOPEN This is an open dialog (Windows only). + +wxSAVE This is a save dialog (Windows only). + +wxHIDE_READONLY Hide read-only files (Windows only). + +wxOVERWRITE_PROMPT Prompt for a conformation if a file will be overridden (Windows only). + +pos = Dialog position. +"""