]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/ImageBrowser.py
Removed fstream include which seemed unnecessary, and gave errors for BC++ 5.5 anyway.
[wxWidgets.git] / wxPython / demo / ImageBrowser.py
1 #----------------------------------------------------------------------------
2 # Name: ImageBrowser.py
3 # Purpose: Image Selection dialog for wxPython demo
4 #
5 # Author: Lorne White (email: lorne.white@telusplanet.net)
6 #
7 # Version 0.5
8 # Date: Feb 26, 2001
9 # Licence: wxWindows license
10 #----------------------------------------------------------------------------
11
12 from wxPython.wx import *
13 from wxPython.lib.imagebrowser import *
14 import os
15
16 #---------------------------------------------------------------------------
17
18 def runTest(frame, nb, log):
19 dir = os.getcwd() # get working directory
20 initial_dir = os.path.join(dir, 'bitmaps') # set the initial directory for the demo bitmaps
21 win = ImageDialog(frame, initial_dir) # open the image browser dialog
22 win.Centre()
23 if win.ShowModal() == wxID_OK:
24 log.WriteText("You Selected File: " + win.GetFile()) # show the selected file
25 else:
26 log.WriteText("You pressed Cancel\n")
27
28 #---------------------------------------------------------------------------
29
30
31
32
33
34
35
36
37
38
39 overview = """\
40 """