~brian-sidebotham/wxwidgets-cmake/wxpython-2.9.4

« back to all changes in this revision

Viewing changes to wxPython/demo/StaticBox.py

  • Committer: Brian Sidebotham
  • Date: 2013-08-03 14:30:08 UTC
  • Revision ID: brian.sidebotham@gmail.com-20130803143008-c7806tkych1tp6fc
Initial import into Bazaar

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
import wx
 
3
 
 
4
#----------------------------------------------------------------------
 
5
 
 
6
class TestPanel(wx.Panel):
 
7
    def __init__(self, parent, log):
 
8
        self.log = log
 
9
        wx.Panel.__init__(self, parent, -1)
 
10
 
 
11
        box = wx.StaticBox(self, -1, "This is a wx.StaticBox")
 
12
        bsizer = wx.StaticBoxSizer(box, wx.VERTICAL)
 
13
 
 
14
        t = wx.StaticText(self, -1, "Controls placed \"inside\" the box are really its siblings")
 
15
        bsizer.Add(t, 0, wx.TOP|wx.LEFT, 10)
 
16
 
 
17
 
 
18
        border = wx.BoxSizer()
 
19
        border.Add(bsizer, 1, wx.EXPAND|wx.ALL, 25)
 
20
        self.SetSizer(border)
 
21
        
 
22
 
 
23
#----------------------------------------------------------------------
 
24
 
 
25
def runTest(frame, nb, log):
 
26
    win = TestPanel(nb, log)
 
27
    return win
 
28
 
 
29
#----------------------------------------------------------------------
 
30
 
 
31
 
 
32
 
 
33
overview = """<html><body>
 
34
<h2><center>wx.StaticBox</center></h2>
 
35
 
 
36
This control draws a box and can be used to group other controls.
 
37
 
 
38
</body></html>
 
39
"""
 
40
 
 
41
 
 
42
 
 
43
if __name__ == '__main__':
 
44
    import sys,os
 
45
    import run
 
46
    run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
 
47