]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxGenericDirCtrl.py
1 from wxPython
.wx
import *
3 #----------------------------------------------------------------------
5 class TestPanel(wxPanel
):
6 def __init__(self
, parent
, log
):
7 wxPanel
.__init
__(self
, parent
, -1)
10 txt1
= wxStaticText(self
, -1, "style=0")
11 dir1
= wxGenericDirCtrl(self
, -1, size
=(200,225), style
=0)
13 txt2
= wxStaticText(self
, -1, "wxDIRCTRL_DIR_ONLY")
14 dir2
= wxGenericDirCtrl(self
, -1, size
=(200,225), style
=wxDIRCTRL_DIR_ONLY
)
16 txt3
= wxStaticText(self
, -1, "wxDIRCTRL_SHOW_FILTERS")
17 dir3
= wxGenericDirCtrl(self
, -1, size
=(200,225), style
=wxDIRCTRL_SHOW_FILTERS
,
18 filter="All files (*.*)|*.*|Python files (*.py)|*.py")
20 sz
= wxFlexGridSizer(cols
=3, hgap
=5, vgap
=5)
21 sz
.Add(35, 35) # some space above
29 sz
.Add(dir1
, 0, wxEXPAND
)
30 sz
.Add(dir2
, 0, wxEXPAND
)
31 sz
.Add(dir3
, 0, wxEXPAND
)
33 sz
.Add(35,35) # some space below
40 self
.SetAutoLayout(True)
43 #----------------------------------------------------------------------
45 def runTest(frame
, nb
, log
):
46 win
= TestPanel(nb
, log
)
50 #----------------------------------------------------------------------
57 This control can be used to place a directory listing (with optional files)
58 on an arbitrary window.