]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/ImageBrowser.py
1 #----------------------------------------------------------------------------
2 # Name: ImageBrowser.py
3 # Purpose: Image Selection dialog for wxPython demo
5 # Author: Lorne White (email: lorne.white@telusplanet.net)
9 # Licence: wxWindows license
10 #----------------------------------------------------------------------------
12 from wxPython
.wx
import *
13 from wxPython
.lib
.imagebrowser
import *
16 #---------------------------------------------------------------------------
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
23 if win
.ShowModal() == wxID_OK
:
24 log
.WriteText("You Selected File: " + win
.GetFile()) # show the selected file
26 log
.WriteText("You pressed Cancel\n")
28 #---------------------------------------------------------------------------