]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/ImageBrowser.py
Got rid of the BIN dir
[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
8fa876ca 12import os
49875c53 13
8fa876ca
RD
14import wx
15import wx.lib.imagebrowser as ib
49875c53
RD
16#---------------------------------------------------------------------------
17
18def runTest(frame, nb, log):
8fa876ca
RD
19 # get current working directory
20 dir = os.getcwd()
21
22 # set the initial directory for the demo bitmaps
23 initial_dir = os.path.join(dir, 'bitmaps')
24
25 # open the image browser dialog
26 win = ib.ImageDialog(frame, initial_dir)
27
49875c53 28 win.Centre()
8fa876ca
RD
29
30 if win.ShowModal() == wx.ID_OK:
31 # show the selected file
32 log.WriteText("You Selected File: " + win.GetFile())
49875c53
RD
33 else:
34 log.WriteText("You pressed Cancel\n")
1fded56b 35
8fa876ca
RD
36 win.Destroy()
37
49875c53
RD
38#---------------------------------------------------------------------------
39
40
49875c53
RD
41overview = """\
42"""
1fded56b 43
1fded56b
RD
44if __name__ == '__main__':
45 import sys,os
46 import run
8eca4fef 47 run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
1fded56b 48