]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/ImageBrowser.py
mention ShouldInheritColours() change
[wxWidgets.git] / wxPython / demo / ImageBrowser.py
CommitLineData
49875c53
RD
1#----------------------------------------------------------------------------
2# Name: ImageBrowser.py
3# Purpose: Image Selection dialog for wxPython demo
4#
5# Author: Lorne White (email: lorne.white@telusplanet.net)
6#
1fded56b 7# Version 0.5
49875c53
RD
8# Date: Feb 26, 2001
9# Licence: wxWindows license
10#----------------------------------------------------------------------------
11
12from wxPython.wx import *
13from wxPython.lib.imagebrowser import *
14import os
15
16#---------------------------------------------------------------------------
17
18def 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()
1fded56b 23 if win.ShowModal() == wxID_OK:
49875c53
RD
24 log.WriteText("You Selected File: " + win.GetFile()) # show the selected file
25 else:
26 log.WriteText("You pressed Cancel\n")
1fded56b 27
49875c53
RD
28#---------------------------------------------------------------------------
29
30
31
32
33
34
35
36
37
38
39overview = """\
40"""
1fded56b
RD
41
42
43
44
45if __name__ == '__main__':
46 import sys,os
47 import run
48 run.main(['', os.path.basename(sys.argv[0])])
49