]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/tests/paul.py
wxPython 2.1b1:
[wxWidgets.git] / utils / wxPython / tests / paul.py
diff --git a/utils/wxPython/tests/paul.py b/utils/wxPython/tests/paul.py
new file mode 100644 (file)
index 0000000..0341e7e
--- /dev/null
@@ -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
+