X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f91cd3896917fc386a1f7ede095c6cdf5fcdf7e6..8bf5d46efb26ab22575ca9bc0d0ca5d32d6b77a3:/utils/wxPython/tests/paul.py diff --git a/utils/wxPython/tests/paul.py b/utils/wxPython/tests/paul.py new file mode 100644 index 0000000000..0341e7eb7d --- /dev/null +++ b/utils/wxPython/tests/paul.py @@ -0,0 +1,28 @@ +from wxPython.wx import * + + +class MyFrame(wxFrame): + def __init__(self, parent, id, title='A pxFrame!'): + wxFrame.__init__(self, parent, id, title, + wxPyDefaultPosition, wxSize(50, 50)) + + def get_filename(self): + dlg = wxFileDialog(self, "Choose a file", ".", "", "*.*", wxOPEN) + dlg.ShowModal() + self.file = dlg.GetPath() + dlg.Destroy() + self.Iconize(true) + return self.file + + +class FilePicker(wxApp): + def OnInit(self): + return true + + def get_filename(self): + dlg = wxFileDialog(NULL, "Choose a file", ".", "", "*.*", wxOPEN) + dlg.ShowModal() + self.file = dlg.GetPath() + dlg.Destroy() + return self.file +