1 # 11/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
3 # o Updated for wx namespace
8 #----------------------------------------------------------------------
10 class TestPanel(wx
.Panel
):
11 def __init__(self
, parent
, log
):
12 wx
.Panel
.__init
__(self
, parent
, -1)
15 txt1
= wx
.StaticText(self
, -1, "style=0")
16 dir1
= wx
.GenericDirCtrl(self
, -1, size
=(200,225), style
=0)
18 txt2
= wx
.StaticText(self
, -1, "wx.DIRCTRL_DIR_ONLY")
19 dir2
= wx
.GenericDirCtrl(self
, -1, size
=(200,225), style
=wx
.DIRCTRL_DIR_ONLY
)
21 txt3
= wx
.StaticText(self
, -1, "wx.DIRCTRL_SHOW_FILTERS")
22 dir3
= wx
.GenericDirCtrl(self
, -1, size
=(200,225), style
=wx
.DIRCTRL_SHOW_FILTERS
,
23 filter="All files (*.*)|*.*|Python files (*.py)|*.py")
25 sz
= wx
.FlexGridSizer(cols
=3, hgap
=5, vgap
=5)
26 sz
.Add((35, 35)) # some space above
34 sz
.Add(dir1
, 0, wx
.EXPAND
)
35 sz
.Add(dir2
, 0, wx
.EXPAND
)
36 sz
.Add(dir3
, 0, wx
.EXPAND
)
38 sz
.Add((35,35)) # some space below
46 self
.SetAutoLayout(True)
49 #----------------------------------------------------------------------
51 def runTest(frame
, nb
, log
):
52 win
= TestPanel(nb
, log
)
55 #----------------------------------------------------------------------
59 This control can be used to place a directory listing (with optional files)
60 on an arbitrary window. The control contains a TreeCtrl window representing
61 the directory hierarchy, and optionally, a Choice window containing a list
64 The filters work in the same manner as in FileDialog.
69 if __name__
== '__main__':
72 run
.main(['', os
.path
.basename(sys
.argv
[0])])